Search
Button Members
Constructors Properties Methods Events
 


A button-like manipulator.

The following tables list the members exposed by the Button type.

 Public Constructors

  Name Description

Button

Initializes a new instance of the Button class.

 Public Properties

  Name Description

Bounds

Gets or sets the bounds of this manipulator, relative to its parent, expressed as percentages.

Brush

Gets or sets the background brush of the button when it is in normal state.

BrushHovered

Gets or sets the background brush of the button when it is in hovered state.

BrushPressed

Gets or sets the background brush of the button when it is in pressed state.

Focusable

Gets or sets a value indicating whether this manipulator can receive input focus. (Inherited from Manipulator.)

Font

Gets or sets the font of the button text.

Image

Gets or sets the image associated with the button.

ImageAlign

Gets or sets the alignment of the button image.

ImageList

Gets or sets a list with images. Each image in the list represents the appearance of the button in one of its states: 0 - normal, 1 - pressed, 2 - disabled, 3 - hovered.

IsEnabled

Gets or sets a value indicating whether this manipulator is enabled and can be interacted with. (Inherited from Manipulator.)

Item

Gets the target item of this manipulator. is attached to. (Inherited from Manipulator.)

Padding

Gets or sets a value indicating the distance between the button border and its contents.

Pen

Gets or sets the border pen of the button when it is in normal state.

PenHovered

Gets or sets the border pen of the button when it is in hovered state.

PenPressed

Gets or sets the border pen of the button when it is in pressed state.

Text

Gets or sets the text of the button.

TextColor

Gets or sets the color of the button text.

TextFormat

Gets or sets the layout properties of the button text.

 Protected Properties

  Name Description

IsFocused

Gets or sets a value indicating whether the manipulator currently holds the input focus. (Inherited from Manipulator.)

State

Gets the current state of the button.

 Public Methods

  Name Description

AddToRepaintRect

Manipulator.AddToRepaintRect override.

Apply

Calls OnClick with argument transformed to local coordinates if necessary. (Inherited from Manipulator.)

Cancel

Called when the manipulator should cancel the current manipulation. (Inherited from Manipulator.)

Draw

Manipulator.Draw override.

DrawsInLocalCoordinates

Returns whether the manipulator object draws in local or global coordinates. (Inherited from Manipulator.)

HitTest

Manipulator.HitTest override.

NeedsMouseMessages

Manipulator.NeedsMouseMessages override.

OnClick

Manipulator.HitTest override.

OnGotFocus

Manipulator.OnGotFocus override.

OnKeyDown

Manipulator.OnKeyDown override.

OnKeyPress

Called when a character key is pressed when this manipulator has the input focus. (Inherited from Manipulator.)

OnLostFocus

Manipulator.OnLostFocus override.

OnMouseDown

Manipulator.OnMouseDown override.

OnMouseMove

Manipulator.OnMouseMove override.

OnMouseUp

Manipulator.OnMouseUp override.

OnZoomChanged

Called when the zoom factor in the diagram containing the manipulator has changed. (Inherited from Manipulator.)

SetMouseCursor

Returns the cursor that should be displayed when the mouse pointer is over this manipulator. (Inherited from Manipulator.)

SupportClipping

Manipulator.SupportClipping override.

 Protected Methods

  Name Description

GetBounds

Gets the absolute bounding rectangle of this manipulator.

GetImage

Gets the image from the button's image list corresponding to the current state of the button.

Invalidate

Invalidates the appearance of the manipulator.

OnClicked

Raises the Clicked event.

OnCustomDraw

Raises the CustomDraw event.

OnIsEnabledChanged

Manipulator.OnIsEnabledChanged override.

 Public Events

  Name Description

Clicked

Raised when the button is clicked.

CustomDraw

Raised when the button is drawn to allow for custom drawing.

 See Also