ControlExtensionsSetStyle Method
Sets a specified
ControlStyles flag to either
or
.
It calls the protected
Control.SetStyle method on the specified
control as if it was a public method.
Namespace: KGySoft.WinFormsAssembly: KGySoft.WinForms (in KGySoft.WinForms.dll) Version: 5.0.1
public static void SetStyle(
this Control control,
ControlStyles flags,
bool value
)
<ExtensionAttribute>
Public Shared Sub SetStyle (
control As Control,
flags As ControlStyles,
value As Boolean
)
public:
[ExtensionAttribute]
static void SetStyle(
Control^ control,
ControlStyles flags,
bool value
)
[<ExtensionAttribute>]
static member SetStyle :
control : Control *
flags : ControlStyles *
value : bool -> unit
- control Control
- The control to set.
- flags ControlStyles
- The ControlStyles bits to set.
- value Boolean
- true to apply the specified style to the control; otherwise, false.
In Visual Basic and C#, you can call this method as an instance method on any object of type
Control. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).