Table of Contents

Class ButtonBase

Namespace
Stride.UI.Controls
Assembly
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
Inheritance
ButtonBase
Implements
Derived
Inherited Members
Extension Methods

Constructors

ButtonBase()

Create an instance of button.

protected ButtonBase()

Fields

ClickEvent

Identifies the Click routed event.

public static readonly RoutedEvent<RoutedEventArgs> ClickEvent

Field Value

RoutedEvent<RoutedEventArgs>

Properties

ClickMode

Gets or sets when the Click event occurs.

[DataMember]
[Display(null, "Behavior")]
public ClickMode ClickMode { get; set; }

Property Value

ClickMode

IsPressed

Gets a value that indicates whether the button is currently down.

public virtual bool IsPressed { get; protected set; }

Property Value

bool

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

args RoutedEventArgs

The arguments of the event

OnTouchDown(TouchEventArgs)

The class handler of the event TouchDown. This method can be overridden in inherited classes to perform actions common to all instances of a class.

protected override void OnTouchDown(TouchEventArgs args)

Parameters

args TouchEventArgs

The arguments of the event

OnTouchLeave(TouchEventArgs)

The class handler of the event TouchLeave. This method can be overridden in inherited classes to perform actions common to all instances of a class.

protected override void OnTouchLeave(TouchEventArgs args)

Parameters

args TouchEventArgs

The arguments of the event

OnTouchUp(TouchEventArgs)

The class handler of the event TouchUp. This method can be overridden in inherited classes to perform actions common to all instances of a class.

protected override void OnTouchUp(TouchEventArgs args)

Parameters

args TouchEventArgs

The arguments of the event

Events

Click

Occurs when a Button is clicked.

public event EventHandler<RoutedEventArgs> Click

Event Type

EventHandler<RoutedEventArgs>

Remarks

A click event is bubbling