CommandButton Class
Defines a custom command button control.
public class CommandButton : UIControl, IUIControl, IUIElement, ILogicalTreeNode, IDpiAwareElement, IDisposable
- Inheritance:
- object MarshalByRefObject Component Control ScrollableControl UIControl object
- Implements:
- IUIControl IUIElement ILogicalTreeNode IDpiAwareElement IDisposable
Constructors
CommandButton()
Initializes an instance of the CommandButton
class.
public CommandButton()
Properties
CanDrawStates
Gets or sets whether the button can draw states.
public bool CanDrawStates { get; set; }
Property Value
- bool:
true
if the button can draw states; otherwise,false
.
CaptureMouseWhenPressed
Indicates whether to automatically capture the mouse when the element is pressed.
protected override bool CaptureMouseWhenPressed { get; }
Property Value
- bool:
true
if the mouse should automatically be captured when the element is pressed; otherwise,false
.
Command
Gets the ICommand for the button.
Image
Gets or sets the image.
IsCheckable
Gets or sets whether the button is checkable.
public bool IsCheckable { get; set; }
Property Value
- bool:
true
if the button is checkable; otherwise,false
.
IsChecked
Gets or sets whether the button is checked.
public bool IsChecked { get; set; }
Property Value
- bool:
true
if the button is checked; otherwise,false
.
Methods
OnEnabledChanged(EventArgs)
Raises the EnabledChanged
event.
protected override void OnEnabledChanged(EventArgs e)
Parameter | Type | Description |
---|---|---|
e | EventArgs | An |
OnGotFocus(EventArgs)
Raises the GotFocus
event.
protected override void OnGotFocus(EventArgs e)
Parameter | Type | Description |
---|---|---|
e | EventArgs | An |
OnLostFocus(EventArgs)
Raises the LostFocus
event.
protected override void OnLostFocus(EventArgs e)
Parameter | Type | Description |
---|---|---|
e | EventArgs | An |
OnMouseDown(MouseEventArgs)
Raises the MouseDown event.
protected override void OnMouseDown(MouseEventArgs e)
Parameter | Type | Description |
---|---|---|
e | MouseEventArgs | A |
OnMouseEnter(EventArgs)
Raises the MouseEnter
event.
protected override void OnMouseEnter(EventArgs e)
Parameter | Type | Description |
---|---|---|
e | EventArgs | An |
OnMouseLeave(EventArgs)
Raises the MouseLeave
event.
protected override void OnMouseLeave(EventArgs e)
Parameter | Type | Description |
---|---|---|
e | EventArgs | An |
OnMouseUp(MouseEventArgs)
Raises the MouseUp event.
protected override void OnMouseUp(MouseEventArgs e)
Parameter | Type | Description |
---|---|---|
e | MouseEventArgs | A |
OnParentChanged()
Occurs when the parent is changed.
protected override void OnParentChanged()
OnRender(PaintEventArgs)
Renders the element.
protected override void OnRender(PaintEventArgs e)
Parameter | Type | Description |
---|---|---|
e | PaintEventArgs | A PaintEventArgs that contains the event data. |
ProcessCmdKey(ref Message, Keys)
Processes a command key.
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
Parameter | Type | Description |
---|---|---|
msg | Message | The message. |
keyData | Keys | The key data to examine. |
Returns
- bool:
true
if the specified key is processed; otherwise,false
.
Inherited Members
- UIControl.Dispose(bool)
- UIControl.AddPendingGraphicsInversion(Rectangle)
- UIControl.AddPendingScrollOperation(Rectangle, Orientation, int)
- UIControl.AddPendingScrollOperation(Rectangle, int, int)
- UIControl.AddToInvalidatedRegion()
- UIControl.AddToInvalidatedRegion(Rectangle)
- UIControl.Arrange(Rectangle)
- UIControl.ArrangeOverride(Size)
- UIControl.ContainsLocation(Point)
- UIControl.CreateChildren()
- UIControl.DpiScaleChanged(SizeF)
- UIControl.GetCursor(Point)
- UIControl.Invalidate(InvalidationLevels, InvalidationTypes)
- UIControl.InvalidateArrange()
- UIControl.InvalidateMeasure()
- UIControl.Measure(Graphics, Size)
- UIControl.MeasureOverride(Graphics, Size)
- UIControl.OnClick(EventArgs)
- UIControl.OnDoubleClick(EventArgs)
- UIControl.OnDpiChangedAfterParent(EventArgs)
- UIControl.OnHandleCreated(EventArgs)
- UIControl.OnLayout(LayoutEventArgs)
- UIControl.OnLocationChanged(EventArgs)
- UIControl.OnMouseCaptureChanged(EventArgs)
- UIControl.OnMouseHover(EventArgs)
- UIControl.OnMouseMove(MouseEventArgs)
- UIControl.OnMouseWheel(MouseEventArgs)
- UIControl.OnPaint(PaintEventArgs)
- UIControl.OnPaintBackground(PaintEventArgs)
- UIControl.OnParentChanged(EventArgs)
- UIControl.OnRenderChildElements(PaintEventArgs)
- UIControl.OnResize(EventArgs)
- UIControl.OnRightToLeftChanged(EventArgs)
- UIControl.OnVisibleChanged(EventArgs)
- UIControl.Render(PaintEventArgs)
- UIControl.ResetDoubleBufferCanvas(bool)
- UIControl.ResumePainting()
- UIControl.SuspendPainting()
- UIControl.TransformToAncestor(IUIElement)
- UIControl.TransformToDescendant(IUIElement)
- UIControl.UpdateCursor()
- UIControl.UpdateLayout()
- UIControl.ActualHeight
- UIControl.ActualWidth
- UIControl.BackColor
- UIControl.BackgroundImage
- UIControl.ClipBounds
- UIControl.DesiredSize
- UIControl.DpiScaleFactor
- UIControl.Font
- UIControl.ForeColor
- UIControl.IsArrangeValid
- UIControl.IsMeasureValid
- UIControl.IsPaintValid
- UIControl.IsRightToLeft
- UIControl.LastMouseUpButton
- UIControl.PaintingSuspended
- UIControl.UseControlGraphicsForMeasure
- UIControl.UseExtendedDoubleBuffering
- MarshalByRefObject.GetLifetimeService()
- MarshalByRefObject.InitializeLifetimeService()
- MarshalByRefObject.MemberwiseClone(bool)
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()