ButtonBase Class
Namespace: Stride.UI.ControlsAssembly: Stride.UI.dll
Represents the base primitive for all the button-like controls
[DataContract("ButtonBase")]
[DataContractMetadataType(typeof(ButtonBase.ButtonBaseMetadata))]
[Display(null, "Input")]
public abstract class ButtonBase : ContentControl, IUIElementUpdate, IUIElementChildren, IIdentifiable
Name | Description | |
---|---|---|
Constructors | ||
ButtonBase() | Create an instance of button. |
|
Fields | ||
ClickEvent | Identifies the Click routed event. |
|
Properties | ||
ClickMode | Gets or sets when the Click event occurs. |
|
IsPressed | Gets a value that indicates whether the button is currently down. |
|
Methods | ||
OnClick(RoutedEventArgs) | The class handler of the event Click. This method can be overridden in inherited classes to perform actions common to all instances of a class. |
|
OnTouchDown(TouchEventArgs) | ||
OnTouchLeave(TouchEventArgs) | ||
OnTouchUp(TouchEventArgs) | ||
Events | ||
Click | Occurs when a Button is clicked. |
Constructors
ButtonBase()
Create an instance of button.
protected ButtonBase()
Fields
ClickEvent
Identifies the Click routed event.
public static readonly RoutedEvent<RoutedEventArgs> ClickEvent
Field Value
Type | Description |
---|---|
RoutedEvent<RoutedEventArgs> |
Properties
ClickMode
Gets or sets when the Click event occurs.
[DataMember]
[Display(null, "Behavior")]
public ClickMode ClickMode { get; set; }
Property Value
Type | Description |
---|---|
ClickMode |
IsPressed
Gets a value that indicates whether the button is currently down.
public virtual bool IsPressed { get; protected set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
OnClick(RoutedEventArgs)
The class handler of the event Click. This method can be overridden in inherited classes to perform actions common to all instances of a class.
protected virtual void OnClick(RoutedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
RoutedEventArgs | args | The arguments of the event |
OnTouchDown(TouchEventArgs)
protected override void OnTouchDown(TouchEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
TouchEventArgs | args |
Overrides
OnTouchLeave(TouchEventArgs)
protected override void OnTouchLeave(TouchEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
TouchEventArgs | args |
Overrides
OnTouchUp(TouchEventArgs)
protected override void OnTouchUp(TouchEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
TouchEventArgs | args |
Overrides
| Improve this Doc View SourceEvents
Click
Occurs when a Button is clicked.
public event EventHandler<RoutedEventArgs> Click
Event Type
Type | Description |
---|---|
System.EventHandler<RoutedEventArgs> |
Remarks
A click event is bubbling