Class ControlAndButton
Base abstract class for control with side buttons.
public abstract class ControlAndButton : ControlAndControl, IBaseObjectWithAttr, IBaseObjectWithId, INotifyPropertyChanged, IDisposableObject, IBaseObject, ISupportInitialize, IFocusable, ITextProperty, IComponent, IControl, IDisposable, IWin32Window, ILayoutItem, INotifyDataErrorInfo
- Inheritance
-
ControlAndButton
- Implements
- Derived
Constructors
- ControlAndButton()
Initializes a new instance of the ControlAndButton class.
- ControlAndButton(Control)
Initializes a new instance of the ControlAndButton class with the specified parent control.
Fields
- DefaultBtnComboBoxImage
Gets or sets default image for the 'ComboBox' button.
- DefaultBtnComboBoxSvg
Gets or sets default svg image for 'ComboBox' button.
- DefaultBtnEllipsisImage
Gets or sets default image for the 'Ellipsis' button.
- DefaultBtnMinusImage
Gets or sets default image for the 'Minus' button.
- DefaultBtnPlusImage
Gets or sets default image for the 'Plus' button.
- DefaultSubstituteControlMargin
Represents the default margin applied to SubstituteControl.
- IsMinusButtonFirst
Gets or sets whether minus button is shown before plus button. Default value is True.
Properties
- AutoBackColor
Gets or sets whether background color is updated when InnerOuterBorder property is changed.
- BtnComboBoxSvg
Gets or sets 'ComboBox' button image as SvgImage.
- BtnEllipsisImage
Gets or sets 'Ellipsis' button image as KnownButton. Default is null, which means that DefaultBtnEllipsisImage is used.
- BtnEllipsisImageSvg
Gets or sets 'Ellipsis' button image as SvgImage. Default is null, which means that BtnEllipsisImage is used.
- BtnMinusImage
Gets or sets 'Minus' button image as KnownButton. Default is null, which means that DefaultBtnMinusImage is used.
- BtnMinusImageSvg
Gets or sets 'Minus' button image as SvgImage. Default is null, which means that BtnMinusImage is used.
- BtnPlusImage
Gets or sets 'Plus' button image as KnownButton. Default is null, which means that DefaultBtnPlusImage is used.
- BtnPlusImageSvg
Gets or sets 'Plus' button image as SvgImage. Default is null, which means that BtnPlusImage is used.
- ButtonCombo
Gets combo button if it is available.
- ButtonEllipsis
Gets ellipsis button if it is available.
- ButtonMinus
Gets 'Minus' button if it is available.
- ButtonOverride
Gets or sets 'ComboBox' button image as KnownButton.
- ButtonPlus
Gets 'Plus' button if it is available.
- ButtonsVisible
Gets or sets visibility of the attached ToolBar control.
- HasBtnComboBox
Gets or sets whether 'ComboBox' button is visible.
- HasBtnEllipsis
Gets or sets whether 'Ellipsis' button is visible.
- HasBtnPlusMinus
Gets or sets whether 'Plus' and 'Minus' buttons are visible.
- HasErrors
Gets a value that indicates whether this control or its child controls have validation errors.
- HasInnerBorder
Gets or sets whether main inner control has border.
- IdButtonCombo
Gets id of the combo button.
- IdButtonEllipsis
Gets id of the ellipsis button.
- IdButtonMinus
Gets id of the minus button.
- IdButtonPlus
Gets id of the plus button.
- InnerOuterBorder
Gets or sets where border is painted (around the child or around the parent). When this property is set, background color is also updated if AutoBackColor is true.
- InnerSuggestedHeight
Gets or sets SuggestedHeight property of the main child control.
- InnerSuggestedSize
Gets or sets SuggestedSize property of the main child control.
- InnerSuggestedWidth
Gets or sets SuggestedWidth property of the main child control.
- IsBtnClickRepeated
Gets or sets 'IsClickRepeated' property of the buttons.
- IsButtonLeft
Gets or sets whether buttons are aligned to the left or to the right.
- IsSubstituteControlCreated
Gets whether substitute control is created.
- MainControl
Gets main child control.
- SubstituteControl
Gets or sets substitute control which can be used instead of the main child control.
- UseSubstituteControl
Gets or sets whether substitute control is used instead of the main child control.
Methods
- CreateControl()
Creates main child control.
- CreateSubstituteControl()
Creates substitute control which can be optionally used instead of the main child control. By default, it is Label.
- GetBtnComboType()
Gets type of the SpeedButton ancestor class used as combo box button.
- GetBtnEllipsisType()
Gets type of the SpeedButton ancestor class used as 'Ellipsis' button.
- GetBtnName(ObjectUniqueId?)
Gets button name for the debug purposes for the specified button id.
- GetBtnPlusMinusType()
Gets type of the SpeedButton ancestor class used as 'Plus' and 'Minus' buttons.
- GetErrors(string?)
Gets the validation errors for this control and its child controls.
- HasButton(ObjectUniqueId?)
Gets whether button with the specified id is visible.
- NeedDefaultButton()
Gets whether default button need to be created in the constructor.
- OnButtonClick(ControlAndButtonClickEventArgs)
Called when button is clicked.
- OnSubstituteControlMouseLeftButtonDown(object, MouseEventArgs)
Called when mouse left button is pressed on the substitute control.
- OnSystemColorsChanged(EventArgs)
Called when the SystemColorsChanged event is raised.
- RaiseAutoBackColorChanged()
Raised when AutoBackColor property is changed.
- RaiseButtonClick(ControlAndButtonClickEventArgs)
Raises ButtonClick event and calls OnButtonClick(ControlAndButtonClickEventArgs) method.
- ReportError(bool, string?)
Reports an error information.
- SetFocus()
Sets input focus to the control.
- SetMinusImage(SvgImage?, KnownButton?)
Sets the SVG image and/or known image for the 'Minus' button.
- SetPlusImage(SvgImage?, KnownButton?)
Sets the SVG image and/or known image for the 'Plus' button.
- SetPlusMinusImages(SvgImage?, SvgImage?)
Sets images for the plus and minus buttons.
- SetPlusMinusImages(KnownButton?, KnownButton?)
Sets images for the plus and minus buttons.
- SetSingleButton(KnownButton?)
Initializes buttons so only combo button with the specified image remains visible.
- UpdateComboBoxImage()
Called when combo box image needs to be updated. Assigns combo box image using different properties of the control.
- UpdateSubstituteControlText()
Updates the text of the substitute control to match the text of the main control.
Events
- ButtonClick
Occurs when button is clicked.
- DelayedTextChanged
Occurs when DelayedTextChanged event of the inner control is changed.
- TextChanged
Occurs when TextChanged event of the inner control is changed.