Class ButtonBase
Represents the base class for all button controls, such as Button, RepeatButton,
and HyperlinkButton.
Inheritance
System.Object
ButtonBase
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: OpenSilver.dll
public class ButtonBase : ContentControl
Constructors
|
Improve this Doc
View Source
Declaration
Fields
|
Improve this Doc
View Source
Identifies the ClickMode dependency property.
Declaration
public static readonly DependencyProperty ClickModeProperty
Field Value
|
Improve this Doc
View Source
Declaration
public static readonly DependencyProperty CommandParameterProperty
Field Value
|
Improve this Doc
View Source
Identifies the Command dependency
property.
Declaration
public static readonly DependencyProperty CommandProperty
Field Value
|
Improve this Doc
View Source
Identifies the IsFocused dependency property.
Declaration
public static readonly DependencyProperty IsFocusedProperty
Field Value
|
Improve this Doc
View Source
Declaration
public static readonly DependencyProperty IsMouseOverProperty
Field Value
|
Improve this Doc
View Source
Identifies the IsPressed dependency property.
Declaration
public static readonly DependencyProperty IsPressedProperty
Field Value
Properties
|
Improve this Doc
View Source
Gets or sets when the Click event occurs. The default value is ClickMode.Release.
Declaration
public ClickMode ClickMode { get; set; }
Property Value
|
Improve this Doc
View Source
Gets or sets the command to invoke when this button is pressed.
Declaration
public ICommand Command { get; set; }
Property Value
Type |
Description |
System.Windows.Input.ICommand |
|
|
Improve this Doc
View Source
Gets or sets the parameter to pass to the Command property.
Declaration
public object CommandParameter { get; set; }
Property Value
Type |
Description |
System.Object |
|
|
Improve this Doc
View Source
Gets a value that determines whether the button has focus.
Declaration
public bool IsFocused { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Gets a value indicating whether the mouse pointer is located over this button control.
Declaration
public bool IsMouseOver { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Gets a value that indicates whether a ButtonBase is currently in a pressed state.
The default is false.
Declaration
public bool IsPressed { get; protected set; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
|
Improve this Doc
View Source
Declaration
protected virtual void OnClick()
|
Improve this Doc
View Source
Raises the GotFocus event
Declaration
protected override void OnGotFocus(RoutedEventArgs e)
Parameters
Overrides
|
Improve this Doc
View Source
Called when the value of the IsPressed property changes.
Declaration
protected virtual void OnIsPressedChanged(DependencyPropertyChangedEventArgs e)
Parameters
|
Improve this Doc
View Source
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
Overrides
|
Improve this Doc
View Source
Raises the LostFocus event
Declaration
protected override void OnLostFocus(RoutedEventArgs e)
Parameters
Overrides
|
Improve this Doc
View Source
Declaration
protected override void OnMouseEnter(MouseEventArgs eventArgs)
Parameters
Overrides
|
Improve this Doc
View Source
Declaration
protected override void OnMouseLeave(MouseEventArgs eventArgs)
Parameters
Overrides
|
Improve this Doc
View Source
Declaration
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs eventArgs)
Parameters
Overrides
|
Improve this Doc
View Source
Declaration
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs eventArgs)
Parameters
Overrides
Events
|
Improve this Doc
View Source
Occurs when a button control is clicked.
Declaration
public event RoutedEventHandler Click
Event Type
Extension Methods