Class UserControl
Parent class for all owner draw controls.
[ControlCategory("Other")]
public class UserControl : Control, IBaseObjectWithAttr, IBaseObjectWithId, INotifyPropertyChanged, IDisposableObject, IBaseObject, ISupportInitialize, IFocusable, ITextProperty, IComponent, IControl, IDisposable, IWin32Window, ILayoutItem, INotifyDataErrorInfo
- Inheritance
-
UserControl
- Implements
- Derived
Constructors
- UserControl()
Initializes a new instance of the UserControl class.
- UserControl(Control)
Initializes a new instance of the UserControl class.
Properties
- ClickTrigger
Gets or sets the type of click trigger that determines when a click action is initiated.
- ControlKind
Returns control identifier.
- DefaultUseInternalDropDownMenu
Gets or sets a value indicating whether the application should use the internal drop-down menu by default.
- DropDownMenu
Gets or sets ContextMenu which is shown when control is clicked with left mouse button. Do not mix this with ContextMenu which is shown when right mouse button is clicked.
- DropDownMenuPosition
Gets or sets the alignment position of the drop-down menu. Based on this property, the menu will be aligned horizontally and vertically relative to the control bounds. If not set, the menu will be aligned to the control's bottom-left corner. Default is null.
- DropDownTrigger
Gets or sets the type of click trigger that determines when a drop-down menu is shown.
- HasBorder
Gets or sets a value indicating whether the control has a border.
- Overlays
Gets or sets the collection of overlays associated with the control.
- RefreshOptions
Gets or sets different behavior and visualization options.
- ScrollBars
Gets or sets the type of scroll bars displayed in the control.
- ShowDropDownMenuWhenClicked
Gets or sets a value indicating whether the drop down menu is shown when the control is clicked. Default is true.
- UseInternalDropDownMenu
Gets or sets a value indicating whether an internal drop-down menu should be used. Default is null. If not set, the value of DefaultUseInternalDropDownMenu is used.
- WantChars
Gets or sets whether control wants to get all char/key events for all keys.
Methods
- AddOverlay(IControlOverlay, bool)
Adds the specified overlay to the control.
- DefaultPaint(PaintEventArgs)
Default painting method of the UserControl and its descendants.
- DefaultPaintDebug(PaintEventArgs)
Provides default debug related painting behavior for the control when the application is compiled in debug mode.
- GetBackground(VisualControlState)
Gets the background brush for specified state of the control.
- GetBackgroundAction(VisualControlState)
Gets the background paint action for specified state of the control.
- GetBorderSettings(VisualControlState)
Gets the border settings for specified state of the control.
- GetDefaultHasBorder()
Gets default value for HasBorder.
- GetOverlayRectangle()
Gets rectangle to which the overlay should be fitted.
- GetOverlays()
Gets overlays attached to this control.
- GetRequiredHandlerType()
Gets required control handler type.
- HandleClickTrigger(ClickTriggerKind, MouseEventArgs)
Handles a click trigger event and performs the appropriate action based on the specified trigger kind.
- HasOverlays()
Gets whether this control has overlays.
- OnAfterPaint(PaintEventArgs)
Invoked after the control has completed its painting operations.
- OnKeyDown(KeyEventArgs)
Called when the KeyDown event is raised.
- OnMouseLeftButtonDown(MouseEventArgs)
Called when the left mouse button was pressed.
- OnMouseLeftButtonUp(MouseEventArgs)
Called when the left mouse button was released.
- OnPaint(PaintEventArgs)
Called when the control is redrawn. See Paint for details.
- OnSystemColorsChanged(EventArgs)
Called when the SystemColorsChanged event is raised.
- OnVisualStateChanged(EventArgs)
Called when VisualStateChanged property is changed.
- RaiseAfterPaint(PaintEventArgs)
Raises the AfterPaint event and invokes the
OnAfterPaintmethod.
- RemoveOverlay(IControlOverlay, bool)
Removes the specified overlay from the control.
- RemoveOverlay(ObjectUniqueId?, bool)
Removes an overlay with the specified unique identifier from the overlays collection.
- RemoveOverlays(ControlOverlayFlags, bool)
Removes overlays from the control that match the specified flags.
- SetStateColors(VisualControlState, IReadOnlyFontAndColor?)
Sets StateObjects colors and backgrounds for the state specified in the
stateparameter to the colors fromfontAndColor.
- ShowDropDownMenu(Action?)
Shows attached drop down menu.
- ShowOverlayToolTip(OverlayToolTipParams)
Displays an overlay tooltip at the specified location with the provided content and removal interval.
- ShowOverlayToolTip(object?, object?, MessageBoxIcon?, HVAlignment?, OverlayToolTipFlags, int?)
Displays an overlay tooltip with the specified title, message, and options.
- ShowOverlayToolTipSimple(object?, HVAlignment, OverlayToolTipFlags)
Displays a simple overlay tooltip with the specified message, alignment, and options.
- ShowOverlayToolTipSimple(object?, PointD?, HVAlignment?, OverlayToolTipFlags, int?)
Displays a simple overlay tooltip with the specified message and optional customization parameters.
- ShowOverlayToolTipWithError(object?, object, HVAlignment?, OverlayToolTipFlags, int?)
Displays an overlay tooltip with an error message based on the provided exception.
Events
- AfterPaint
Occurs after the control has finished its painting operation.
- DropDownMenuShowing
Occurs when a drop-down menu is about to be displayed, allowing the event handler to cancel the operation.