Show / Hide Table of Contents

    Class StateButton

    Image button.

    Inheritance
    Object
    BindableObject
    Element
    NavigableElement
    VisualElement
    View
    Layout
    TemplatedView
    ContentView
    ContentView
    Frame
    Button
    StateButton
    ImageButton
    Implements
    INotifyPropertyChanged
    IAnimatable
    ITabStopElement
    IGestureController
    IGestureRecognizers
    ILayout
    ILayoutController
    ILayout
    IDisposable
    IButton
    IButtonController
    IViewController
    IVisualElementController
    IElementController
    IButtonState
    IBackground
    IShape
    ILabel
    ILabelStyle
    IFontElement
    IElement
    Inherited Members
    Button.SelectedFontColorProperty
    Button.SelectedFontColor
    Button.StickyBehaviorProperty
    Button.StickyBehavior
    Button.ImageSourceProperty
    Button.ImageSource
    Button.TrailingImageProperty
    Button.TrailingImage
    Button.TintImageProperty
    Button.TintImage
    Button.IsEllipticalProperty
    Button.IsElliptical
    Button.FontColorProperty
    Button.FontColor
    Button.AlignmentProperty
    Button.Alignment
    Button.FitProperty
    Button.Fit
    Button.Content
    Button.IsLongPressEnabledProperty
    Button.IsLongPressEnabled
    Button.IsClippedProperty
    Button.IsClipped
    Button.SelectedTextColorProperty
    Button.SelectedTextColor
    Button.SelectedBackgroundColorProperty
    Button.SelectedBackgroundColor
    Button.CommandProperty
    Button.Command
    Button.CommandParameterProperty
    Button.CommandParameter
    Button.ToggleBehaviorProperty
    Button.ToggleBehavior
    Button.IsSelectedProperty
    Button.IsSelected
    Button.HapticEffectProperty
    Button.HapticEffect
    Button.HapticEffectModeProperty
    Button.HapticEffectMode
    Button.SoundEffectProperty
    Button.SoundEffect
    Button.SoundEffectModeProperty
    Button.SoundEffectMode
    Button.IconFontFamilyProperty
    Button.IconFontFamily
    Button.TrailingIconProperty
    Button.TrailingIcon
    Button.TintIconProperty
    Button.TintIcon
    Button.IconColorProperty
    Button.IconColor
    Button.IconFontSizeProperty
    Button.IconFontSize
    Button.HasTightSpacingProperty
    Button.HasTightSpacing
    Button.SpacingProperty
    Button.Spacing
    Button.OrientationProperty
    Button.Orientation
    Button.BackgroundColorProperty
    Button.BackgroundColor
    Button.HasShadowProperty
    Button.HasShadow
    Button.OutlineColorProperty
    Button.OutlineColor
    Button.BorderColorProperty
    Button.BorderColor
    Button.OutlineWidthProperty
    Button.OutlineWidth
    Button.BorderWidthProperty
    Button.BorderWidth
    Button.TextColorProperty
    Button.TextColor
    Button.HorizontalTextAlignmentProperty
    Button.HorizontalTextAlignment
    Button.VerticalTextAlignmentProperty
    Button.VerticalTextAlignment
    Button.LineBreakModeProperty
    Button.LineBreakMode
    Button.AutoFitProperty
    Button.AutoFit
    Button.LinesProperty
    Button.Lines
    Button.MinFontSizeProperty
    Button.MinFontSize
    Button.FontSizeProperty
    Button.FontSize
    Button.FontFamilyProperty
    Button.FontFamily
    Button.FontAttributesProperty
    Button.FontAttributes
    Button.DarkThemeProperty
    Button.DarkTheme
    Button.FittedFontSize
    Button.SynchronizedFontSize
    Button._iconImage
    Button._label
    Button._iconLabel
    Button._gestureListener
    Button._constructing
    Button.ToString()
    Button.OnTapped(Object, TapEventArgs)
    Button.UpdateElements(Boolean)
    Button.Clicked
    Button.Pressed
    Button.Released
    Button.Tapped
    Button.InvokeTapped(Object, EventArgs)
    Button.Selected
    Button.InvokeSelected(Object, EventArgs)
    Button.LongPressing
    Button.InvokeLongPressing(Object, EventArgs)
    Button.LongPressed
    Button.InvokeLongPressed(Object, EventArgs)
    Button.GetMinSize()
    Button.CheckIsClipped(Double, Double)
    Button.OnPropertyChanging(String)
    Button.SendTapped()
    Button.SendClicked()
    ContentView.ContentProperty
    ContentView.IgnoreChildrenProperty
    ContentView.IgnoreChildren
    ContentView.BackgroundImageProperty
    ContentView.BackgroundImage
    ContentView.LimitMinSizeToBackgroundImageSizeProperty
    ContentView.LimitMinSizeToBackgroundImageSize
    ContentView.ShadowInvertedProperty
    ContentView.ShadowInverted
    ContentView.OutlineRadiusProperty
    ContentView.OutlineRadius
    ContentView.BorderRadiusProperty
    ContentView.BorderRadius
    ContentView.ElementShapeProperty
    ContentView.ElementShape
    ContentView.InstanceId
    ContentView._f9pId
    ContentView._fallbackBackgroundImage
    ContentView.CurrentBackgroundImage
    ContentView.BaseInternalChildren
    ContentView.Description()
    ContentView.ShouldInvalidateOnChildAdded(View)
    ContentView.ShouldInvalidateOnChildRemoved(View)
    ContentView.OnChildMeasureInvalidated()
    ContentView.OnSizeRequest(Double, Double)
    ContentView.LayoutChildren(Double, Double, Double, Double)
    ContentView.OnBindingContextChanged()
    TemplatedView.ControlTemplateProperty
    TemplatedView.OnApplyTemplate()
    TemplatedView.OnChildRemoved(Element)
    Xamarin.Forms.TemplatedView.OnChildRemoved(Xamarin.Forms.Element, System.Int32)
    TemplatedView.GetTemplateChild(String)
    TemplatedView.ControlTemplate
    Layout.IsClippedToBoundsProperty
    Layout.CascadeInputTransparentProperty
    Layout.PaddingProperty
    Layout.ForceLayout()
    Layout.LayoutChildIntoBoundingRegion(VisualElement, Rectangle)
    Layout.LowerChild(View)
    Layout.RaiseChild(View)
    Layout.InvalidateLayout()
    Layout.OnChildMeasureInvalidated(Object, EventArgs)
    Layout.OnSizeAllocated(Double, Double)
    Layout.UpdateChildrenLayout()
    Layout.IsClippedToBounds
    Layout.Padding
    Layout.CascadeInputTransparent
    Layout.LayoutChanged
    View.VerticalOptionsProperty
    View.HorizontalOptionsProperty
    View.MarginProperty
    View.GetChildElements(Point)
    View.GestureController
    View.GestureRecognizers
    View.IGestureController.CompositeGestureRecognizers
    View.HorizontalOptions
    View.Margin
    View.VerticalOptions
    VisualElement.NavigationProperty
    VisualElement.StyleProperty
    VisualElement.InputTransparentProperty
    VisualElement.IsEnabledProperty
    VisualElement.XProperty
    VisualElement.YProperty
    VisualElement.AnchorXProperty
    VisualElement.AnchorYProperty
    VisualElement.TranslationXProperty
    VisualElement.TranslationYProperty
    VisualElement.WidthProperty
    VisualElement.HeightProperty
    VisualElement.RotationProperty
    VisualElement.RotationXProperty
    VisualElement.RotationYProperty
    VisualElement.ScaleProperty
    VisualElement.ScaleXProperty
    VisualElement.ScaleYProperty
    VisualElement.ClipProperty
    VisualElement.VisualProperty
    VisualElement.IsVisibleProperty
    VisualElement.OpacityProperty
    VisualElement.BackgroundProperty
    VisualElement.BehaviorsProperty
    VisualElement.TriggersProperty
    VisualElement.WidthRequestProperty
    VisualElement.HeightRequestProperty
    VisualElement.MinimumWidthRequestProperty
    VisualElement.MinimumHeightRequestProperty
    VisualElement.IsFocusedProperty
    VisualElement.FlowDirectionProperty
    VisualElement.TabIndexProperty
    VisualElement.IsTabStopProperty
    VisualElement.OnTabIndexPropertyChanged(Int32, Int32)
    VisualElement.TabIndexDefaultValueCreator()
    VisualElement.OnTabStopPropertyChanged(Boolean, Boolean)
    VisualElement.TabStopDefaultValueCreator()
    VisualElement.BatchBegin()
    VisualElement.BatchCommit()
    VisualElement.Focus()
    VisualElement.Layout(Rectangle)
    VisualElement.Measure(Double, Double, MeasureFlags)
    VisualElement.Unfocus()
    VisualElement.InvalidateMeasure()
    VisualElement.OnChildAdded(Element)
    VisualElement.OnChildrenReordered()
    VisualElement.OnMeasure(Double, Double)
    VisualElement.SizeAllocated(Double, Double)
    VisualElement.IVisualElementController.InvalidateMeasure(InvalidationTrigger)
    VisualElement.ChangeVisualState()
    VisualElement.Visual
    VisualElement.FlowDirection
    VisualElement.IVisualElementController.EffectiveFlowDirection
    VisualElement.AnchorX
    VisualElement.AnchorY
    VisualElement.Background
    VisualElement.Behaviors
    VisualElement.Bounds
    VisualElement.Height
    VisualElement.HeightRequest
    VisualElement.InputTransparent
    VisualElement.IsEnabled
    VisualElement.IsFocused
    VisualElement.IsVisible
    VisualElement.MinimumHeightRequest
    VisualElement.MinimumWidthRequest
    VisualElement.Opacity
    VisualElement.Rotation
    VisualElement.RotationX
    VisualElement.RotationY
    VisualElement.Scale
    VisualElement.ScaleX
    VisualElement.ScaleY
    VisualElement.TabIndex
    VisualElement.IsTabStop
    VisualElement.TranslationX
    VisualElement.TranslationY
    VisualElement.Triggers
    VisualElement.Width
    VisualElement.WidthRequest
    VisualElement.X
    VisualElement.Y
    VisualElement.Clip
    VisualElement.Resources
    VisualElement.ChildrenReordered
    VisualElement.Focused
    VisualElement.MeasureInvalidated
    VisualElement.SizeChanged
    VisualElement.Unfocused
    NavigableElement.OnParentSet()
    NavigableElement.Navigation
    NavigableElement.Style
    NavigableElement.StyleClass
    NavigableElement.class
    Element.MenuProperty
    Element.AutomationIdProperty
    Element.ClassIdProperty
    Element.GetMenu(BindableObject)
    Element.SetMenu(BindableObject, Menu)
    Element.IElementController.SetValueFromRenderer(BindableProperty, Object)
    Element.FindByName(String)
    Element.RemoveDynamicResource(BindableProperty)
    Element.SetDynamicResource(BindableProperty, String)
    Element.AutomationId
    Element.ClassId
    Element.Effects
    Element.Id
    Element.StyleId
    Element.Parent
    Element.ChildAdded
    Element.ChildRemoved
    Element.DescendantAdded
    Element.DescendantRemoved
    BindableObject.BindingContextProperty
    BindableObject.ClearValue(BindableProperty)
    BindableObject.ClearValue(BindablePropertyKey)
    BindableObject.GetValue(BindableProperty)
    BindableObject.IsSet(BindableProperty)
    BindableObject.RemoveBinding(BindableProperty)
    BindableObject.SetBinding(BindableProperty, BindingBase)
    BindableObject.ApplyBindings()
    BindableObject.UnapplyBindings()
    BindableObject.SetValue(BindableProperty, Object)
    BindableObject.SetValue(BindablePropertyKey, Object)
    BindableObject.CoerceValue(BindableProperty)
    BindableObject.CoerceValue(BindablePropertyKey)
    BindableObject.Dispatcher
    BindableObject.BindingContext
    BindableObject.PropertyChanged
    BindableObject.PropertyChanging
    BindableObject.BindingContextChanged
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    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
    Button.Dispose(Boolean)

    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
    Button.OnDown(Object, DownUpEventArgs)

    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
    Button.OnLongPressed(Object, LongPressEventArgs)

    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
    Button.OnLongPressing(Object, LongPressEventArgs)

    OnPropertyChanged(String)

    Ons the property changed.

    Declaration
    protected override void OnPropertyChanged(string propertyName = null)
    Parameters
    Type Name Description
    String propertyName

    Property name.

    Overrides
    Button.OnPropertyChanged(String)

    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
    Button.OnUp(Object, DownUpEventArgs)

    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()

    Implements

    System.ComponentModel.INotifyPropertyChanged
    Xamarin.Forms.IAnimatable
    Xamarin.Forms.ITabStopElement
    Xamarin.Forms.Internals.IGestureController
    Xamarin.Forms.IGestureRecognizers
    Xamarin.Forms.ILayout
    Xamarin.Forms.ILayoutController
    ILayout
    System.IDisposable
    IButton
    Xamarin.Forms.IButtonController
    Xamarin.Forms.IViewController
    Xamarin.Forms.IVisualElementController
    Xamarin.Forms.IElementController
    IButtonState
    IBackground
    IShape
    ILabel
    ILabelStyle
    IFontElement
    IElement

    Extension Methods

    VisualElementExtensions.IsDescendentOf(Element, Element)
    VisualElementExtensions.IsAncestorOf(Element, Element)
    VisualElementExtensions.BoundsInWindowCoord(VisualElement)
    VisualElementExtensions.BoundsInElementCoord(VisualElement, VisualElement)
    VisualElementExtensions.LocationInWindowCoord(VisualElement)
    VisualElementExtensions.PointInWindowCoord(VisualElement, Point)
    VisualElementExtensions.LocationInElementCoord(VisualElement, VisualElement)
    VisualElementExtensions.PointInElementCoord(VisualElement, Point, VisualElement)
    VisualElementExtensions.HitTest(VisualElement, Point, VisualElement)
    VisualElementExtensions.GestureListener(VisualElement)
    VisualElementExtensions.FindChildrenWithPropertyAndOfType<T>(VisualElement, String, List<T>)
    VisualElementExtensions.FindChildrenWithProperty(VisualElement, String)
    VisualElementExtensions.FindVisualElementsOfType<T>(VisualElement)
    VisualElementExtensions.FindChildWithFocus(Element)
    VisualElementExtensions.FindAncestorOfType(Element, Type)
    VisualElementExtensions.IsInVisibleViewTree(VisualElement)
    ElementExtensions.AncestorOfBaseType<T>(Element)
    ElementExtensions.Ancestor<T>(Element)
    ElementExtensions.IsInNativeLayout(VisualElement)
    ElementExtensions.SetIsInNativeLayout(VisualElement, Boolean)
    ElementExtensions.GetRenderer(VisualElement)
    ElementExtensions.HasRenderer(VisualElement)
    FontExtensions.LineHeight(IFontElement)
    FontExtensions.LineSpace(IFontElement)
    HardwareKeyListenerExtensions.GetHardwareKeyListeners(View)
    HardwareKeyListenerExtensions.ClearHardwareKeyListeners(View)
    HardwareKeyListenerExtensions.AddHardwareKeyListener(View, String, HardwareKeyModifierKeys, String, EventHandler<HardwareKeyEventArgs>)
    HardwareKeyListenerExtensions.AddHardwareKeyListener(View, String, HardwareKeyModifierKeys, EventHandler<HardwareKeyEventArgs>)
    HardwareKeyListenerExtensions.AddHardwareKeyListener(View, String, EventHandler<HardwareKeyEventArgs>)
    HardwareKeyListenerExtensions.AddHardwareKeyListener(View, String)
    HardwareKeyListenerExtensions.AddHardwareKeyListener(View, HardwareKeyListener)
    HardwareKeyListenerExtensions.RemoveHardwareKeyListener(View, String, HardwareKeyModifierKeys)
    HardwareKeyListenerExtensions.RemoveHardwareKeyListener(View, HardwareKeyListener)
    HardwareKeyListenerExtensions.HardwareKeyFocus(View)
    HardwareKeyListenerExtensions.HardwareKeyUnfocus(VisualElement)
    DebugExtensions.AddToCensus(Object)
    DebugExtensions.RemoveFromCensus(Object)
    ReflectionExtensions.GetProperties(Object)
    ReflectionExtensions.GetProperty(Object, String)
    ReflectionExtensions.PropertyNames(Object)
    ReflectionExtensions.PropertyExists(Object, String)
    ReflectionExtensions.HasProperty(Object, String)
    ReflectionExtensions.GetPropertyValue(Object, String)
    ReflectionExtensions.SetPropertyValue(Object, String, Object)
    ReflectionExtensions.GetFieldValue(Object, String)
    ReflectionExtensions.SetFieldValue(Object, String, Object)
    ReflectionExtensions.CallMethod(Object, String, Object[])
    Back to top Copyright © 2018 42nd Parallel