OkCancelButtons Class

Provides a user control with OK, Cancel and Apply buttons, whose visibility and other properties can be adjusted.

Definition

Namespace: KGySoft.WinForms.Controls
Assembly: KGySoft.WinForms (in KGySoft.WinForms.dll) Version: 5.0.1
C#
[ToolboxBitmapAttribute(typeof(OkCancelButtons), "Resources.Toolbox.OkCancelButtons.png")]
public sealed class OkCancelButtons : BaseUserControl
Inheritance
Object    MarshalByRefObject    Component    Control    ScrollableControl    ContainerControl    UserControl    BaseUserControl    OkCancelButtons

Constructors

OkCancelButtons Initializes a new instance of the OkCancelButtons class.

Properties

ApplyButton Gets the Apply button.
ApplyButtonVisible Gets or sets whether the Apply button is visible.
Default value: .
AutoScale Gets or sets whether the buttons and their panel should be automatically scaled depending on the current DPI settings, regardless of the auto-scaling of the current framework or the AutoScaleMode of the form.
Default value: .
CancelButton Gets the Cancel button.
CancelButtonVisible Gets or sets whether the Cancel button is visible.
Default value: .
CommandBindings Gets the command bindings of this user control. Being a WinFormsCommandBindingsCollection, the Add methods also add the PropertyCommandStateUpdater to the created bindings.
See the GitHub documentation for details.
(Inherited from BaseUserControl)
DynamicStringLocalization Gets or sets the dynamic string localization strategy of the user control. It allows using potentially auto-generated string resources from .resx files.

See the online help of the BaseForm.DynamicStringLocalization property for an example.

(Inherited from BaseUserControl)
OKButton Gets the OK button.
OKButtonVisible Gets or sets whether the OK button is visible.
Default value: .

Events

DynamicStringLocalizationChanged Occurs when the DynamicStringLocalization property has changed.
(Inherited from BaseUserControl)

Extension Methods

GetFormatFlags Gets the formatting flags for the text of a custom drawn control.
(Defined by ControlExtensions)
GetScale Gets the current scale factor of the specified control. If per-monitor DPI awareness is not enabled, it always returns SystemScale.
(Defined by ScaleHelper)
GetScrollBarSize Gets the recommended width and height of scrollbars matching the current scaling of the specified control.
(Defined by ScaleHelper)
HasDefaultScaling Gets whether the display that the specified control belongs to has the same DPI as the initial DPI of the primary display.
(Defined by ScaleHelper)
ScaleHeight Scales the specified height by the vertical scale factor of the control.
(Defined by ScaleHelper)
ScaleSize Scales the specified size by the scale factor of the control.
(Defined by ScaleHelper)
ScaleWidth Scales the specified width by the horizontal scale factor of the control.
(Defined by ScaleHelper)
SetControlEnabled Sets the Enabled property of the child controls within the specified root control, or the Enabled property of the specified control itself, if it is not a recognized container control. By this way pages of a TabControl will remain selectable, a SplitContainer remains resizable, etc.
(Defined by ControlExtensions)
SetControlReadonly Recursively sets the read-only state in the children of the specified root control. Affects TextBoxBase and IReadOnlyCapable instances.
(Defined by ControlExtensions)
SetDoubleBuffered Sets the double buffered state of a control
(Defined by ControlExtensions)
SetStyle 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.
(Defined by ControlExtensions)

See Also