Class StateButton
Image button.
Inheritance
Implements
Inherited Members
Namespace: Forms9Patch
Assembly: Forms9Patch.dll
Syntax
public class StateButton : Button, INotifyPropertyChanged, IDynamicResourceHandler, IElement, INameScope, INavigationProxy, IStyleSelectable, IAnimatable, IResourcesProvider, IStyleElement, IFlowDirectionController, IPropertyPropagationController, IVisualController, ITabStopElement, IStylable, IGestureController, IGestureRecognizers, ILayout, ILayoutController, IPaddingElement, IControlTemplated, ILayout, IDisposable, IButton, IButtonController, IViewController, IVisualElementController, IElementController, IButtonState, IBackground, IShape, ILabel, ILabelStyle, IFontElement, IElement
Constructors
StateButton()
Initializes a new instance of the StateButton class.
Declaration
public StateButton()
Fields
DefaultStateProperty
Backing store for the DefaultState bindable property.
Declaration
public static BindableProperty DefaultStateProperty
Field Value
Type | Description |
---|---|
BindableProperty |
DisabledAndSelectedStateProperty
Backing store for the DisabledAndSelectedState bindable property.
Declaration
public static BindableProperty DisabledAndSelectedStateProperty
Field Value
Type | Description |
---|---|
BindableProperty |
DisabledStateProperty
Backing store for the DisabledState bindable property.
Declaration
public static BindableProperty DisabledStateProperty
Field Value
Type | Description |
---|---|
BindableProperty |
HtmlTextProperty
Backing store for the formatted text property.
Declaration
public static readonly BindableProperty HtmlTextProperty
Field Value
Type | Description |
---|---|
BindableProperty |
IconImageProperty
Backing store for the IconImage property
Declaration
public static BindableProperty IconImageProperty
Field Value
Type | Description |
---|---|
BindableProperty |
IconTextProperty
The image text property backing store
Declaration
public static readonly BindableProperty IconTextProperty
Field Value
Type | Description |
---|---|
BindableProperty |
PressingStateProperty
Backing store for the PressingState bindable property.
Declaration
public static BindableProperty PressingStateProperty
Field Value
Type | Description |
---|---|
BindableProperty |
SelectedStateProperty
Backing store for the SelectedState bindable property.
Declaration
public static BindableProperty SelectedStateProperty
Field Value
Type | Description |
---|---|
BindableProperty |
TextProperty
Backing store for the Button.Text bindable property.
Declaration
public static readonly BindableProperty TextProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Properties
DefaultState
Gets or sets the StateButton's properties for the default button state.
Declaration
public ButtonState DefaultState { get; set; }
Property Value
Type | Description |
---|---|
ButtonState | The ButtonState structure for the default button state. |
DisabledAndSelectedState
Gets or sets the StateButton's properties for the disabled and selected button state.
Declaration
public ButtonState DisabledAndSelectedState { get; set; }
Property Value
Type | Description |
---|---|
ButtonState | The ButtonState structure for the disabled and selected button state. |
DisabledState
Gets or sets the StateButton's properties for the disabled button state.
Declaration
public ButtonState DisabledState { get; set; }
Property Value
Type | Description |
---|---|
ButtonState | The ButtonState structure for the disabled button state. |
HtmlText
Gets or sets the formatted text.
Declaration
public string HtmlText { get; set; }
Property Value
Type | Description |
---|---|
String | The formatted text. |
IconImage
Gets or sets the icon image. Alternatively, use IconText
Declaration
public Image IconImage { get; set; }
Property Value
Type | Description |
---|---|
Image |
IconText
Gets or sets the image text - use this to specify the image as an HTML markup string.
Declaration
public string IconText { get; set; }
Property Value
Type | Description |
---|---|
String | The image text. |
PressingState
Gets or sets the StateButton's properties for the pressing button state.
Declaration
public ButtonState PressingState { get; set; }
Property Value
Type | Description |
---|---|
ButtonState | The ButtonState structure for the pressing button state. |
SelectedState
Gets or sets the StateButton's properties for the selected button state.
Declaration
public ButtonState SelectedState { get; set; }
Property Value
Type | Description |
---|---|
ButtonState | The ButtonState structure for the selected button state. |
Text
Gets or sets the text.
Declaration
public string Text { get; set; }
Property Value
Type | Description |
---|---|
String | The text. |
Methods
Dispose()
Called when the button is disposed
Declaration
public void Dispose()
Dispose(Boolean)
Dispose the specified disposing.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
Boolean | disposing | Disposing. |
Overrides
OnDown(Object, DownUpEventArgs)
Called when the button is pressed down
Declaration
protected override void OnDown(object sender, DownUpEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Object | sender | |
DownUpEventArgs | e |
Overrides
OnLongPressed(Object, LongPressEventArgs)
Called when the button is released from a long press state
Declaration
protected override void OnLongPressed(object sender, LongPressEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Object | sender | |
LongPressEventArgs | e |
Overrides
OnLongPressing(Object, LongPressEventArgs)
Called when the button is in long press state
Declaration
protected override void OnLongPressing(object sender, LongPressEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Object | sender | |
LongPressEventArgs | e |
Overrides
OnPropertyChanged(String)
Ons the property changed.
Declaration
protected override void OnPropertyChanged(string propertyName = null)
Parameters
Type | Name | Description |
---|---|---|
String | propertyName | Property name. |
Overrides
OnUp(Object, DownUpEventArgs)
Called when the button is released
Declaration
protected override void OnUp(object sender, DownUpEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Object | sender | |
DownUpEventArgs | e |
Overrides
ShowState(ButtonState)
Redraws the button to a custom ButtonState
Declaration
public void ShowState(ButtonState newState)
Parameters
Type | Name | Description |
---|---|---|
ButtonState | newState | Custom ButtonState. |
Tap()
Tap this instance.
Declaration
public void Tap()
UpdateState()
Redraws the button to the current state: Default, Selected, Disabled or DisabledAndSelected.
Declaration
public void UpdateState()