Show / Hide Table of Contents

    Class SegmentedControl

    Forms9Patch Material Segmented Control.

    Inheritance
    Object
    BindableObject
    Element
    NavigableElement
    VisualElement
    View
    Layout
    Layout<View>
    ManualLayout
    SegmentedControl
    MaterialSegmentedControl
    Implements
    INotifyPropertyChanged
    IAnimatable
    ITabStopElement
    IViewController
    IVisualElementController
    IElementController
    IGestureController
    IGestureRecognizers
    ILayout
    ILayoutController
    IViewContainer<View>
    ILayout
    IBackground
    IShape
    IElement
    ILabelStyle
    IFontElement
    IDisposable
    Inherited Members
    ManualLayout.IgnoreChildrenProperty
    ManualLayout.IgnoreChildren
    ManualLayout.BackgroundImageProperty
    ManualLayout.BackgroundImage
    ManualLayout.HasShadowProperty
    ManualLayout.HasShadow
    ManualLayout.ShadowInvertedProperty
    ManualLayout.ShadowInverted
    ManualLayout.OutlineColorProperty
    ManualLayout.OutlineColor
    ManualLayout.BorderColorProperty
    ManualLayout.BorderColor
    ManualLayout.OutlineRadiusProperty
    ManualLayout.OutlineRadius
    ManualLayout.BorderRadiusProperty
    ManualLayout.BorderRadius
    ManualLayout.OutlineWidthProperty
    ManualLayout.OutlineWidth
    ManualLayout.BorderWidthProperty
    ManualLayout.BorderWidth
    ManualLayout.ElementShapeProperty
    ManualLayout.ElementShape
    ManualLayout.InstanceId
    ManualLayout.Description()
    ManualLayout.ToString()
    ManualLayout.LayoutChildrenEvent
    ManualLayout.ShouldInvalidateOnChildAdded(View)
    ManualLayout.ShouldInvalidateOnChildRemoved(View)
    ManualLayout.OnChildMeasureInvalidated()
    Layout<View>.OnChildAdded(Element)
    Layout<View>.OnChildRemoved(Element)
    Xamarin.Forms.Layout<Xamarin.Forms.View>.OnChildRemoved(Xamarin.Forms.Element, System.Int32)
    Layout<View>.OnAdded(View)
    Layout<View>.OnRemoved(View)
    Layout<View>.Children
    Layout.IsClippedToBoundsProperty
    Layout.CascadeInputTransparentProperty
    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.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.OnChildrenReordered()
    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.OnPropertyChanging(String)
    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
    [ContentProperty("Segments")]
    public class SegmentedControl : ManualLayout, INotifyPropertyChanged, IDynamicResourceHandler, IElement, INameScope, INavigationProxy, IStyleSelectable, IAnimatable, IResourcesProvider, IStyleElement, IFlowDirectionController, IPropertyPropagationController, IVisualController, ITabStopElement, IStylable, IViewController, IVisualElementController, IElementController, IGestureController, IGestureRecognizers, ILayout, ILayoutController, IPaddingElement, IViewContainer<View>, ILayout, IBackground, IShape, IElement, ILabelStyle, IFontElement, IDisposable

    Constructors

    SegmentedControl()

    Initializes a new instance of the SegmentedControl class.

    Declaration
    public SegmentedControl()

    Fields

    AutoFitProperty

    backing store for AutoFit property

    Declaration
    public static readonly BindableProperty AutoFitProperty
    Field Value
    Type Description
    BindableProperty

    BackgroundColorProperty

    Backing store for the Button.BackgroundColor bindable property.

    Declaration
    public static readonly BindableProperty BackgroundColorProperty
    Field Value
    Type Description
    BindableProperty

    DarkThemeProperty

    Backing store for the Button.DarkTheme property.

    Declaration
    public static readonly BindableProperty DarkThemeProperty
    Field Value
    Type Description
    BindableProperty

    FontAttributesProperty

    Backing store for the Button.FontAttributes bindable property.

    Declaration
    public static readonly BindableProperty FontAttributesProperty
    Field Value
    Type Description
    BindableProperty

    FontColorProperty

    Use TextColorProperty

    Declaration
    [Obsolete("Use TextColorProperty")]
    public static readonly BindableProperty FontColorProperty
    Field Value
    Type Description
    BindableProperty

    FontFamilyProperty

    Backing store for the Button.FontFamiily bindable property.

    Declaration
    public static readonly BindableProperty FontFamilyProperty
    Field Value
    Type Description
    BindableProperty

    FontSizeProperty

    Backing store for the Button.FontSize bindable property.

    Declaration
    public static readonly BindableProperty FontSizeProperty
    Field Value
    Type Description
    BindableProperty

    GroupToggleBehaviorProperty

    The backing store for the MaterialSegmentControl's ToggleBehavior property.

    Declaration
    public static readonly BindableProperty GroupToggleBehaviorProperty
    Field Value
    Type Description
    BindableProperty

    HapticEffectModeProperty

    The haptic mode property.

    Declaration
    public static readonly BindableProperty HapticEffectModeProperty
    Field Value
    Type Description
    BindableProperty

    HapticEffectProperty

    The haptic effect property.

    Declaration
    public static readonly BindableProperty HapticEffectProperty
    Field Value
    Type Description
    BindableProperty

    HasTightSpacingProperty

    The has tight spacing property.

    Declaration
    public static readonly BindableProperty HasTightSpacingProperty
    Field Value
    Type Description
    BindableProperty

    HorizontalTextAlignmentProperty

    Backing store for the horizontal text alignment property.

    Declaration
    public static readonly BindableProperty HorizontalTextAlignmentProperty
    Field Value
    Type Description
    BindableProperty

    IconColorProperty

    Backing store for SegmentedControl IconColor property

    Declaration
    public static readonly BindableProperty IconColorProperty
    Field Value
    Type Description
    BindableProperty

    IconFontFamilyProperty

    Backing store for IconFontFamily property

    Declaration
    public static readonly BindableProperty IconFontFamilyProperty
    Field Value
    Type Description
    BindableProperty

    IconFontSizeProperty

    Backing store for SegmentedControl IconFontSize property

    Declaration
    public static readonly BindableProperty IconFontSizeProperty
    Field Value
    Type Description
    BindableProperty

    IntraSegmentOrientationProperty

    The backing store for the segments orientation property.

    Declaration
    public static readonly BindableProperty IntraSegmentOrientationProperty
    Field Value
    Type Description
    BindableProperty

    IntraSegmentSpacingProperty

    The backing store for the intra segment spacing property.

    Declaration
    public static readonly BindableProperty IntraSegmentSpacingProperty
    Field Value
    Type Description
    BindableProperty

    IsClippedProperty

    Backing store for the IsClipped property

    Declaration
    public static readonly BindableProperty IsClippedProperty
    Field Value
    Type Description
    BindableProperty

    IsLongPressEnabledProperty

    The is long press enabled property.

    Declaration
    public static readonly BindableProperty IsLongPressEnabledProperty
    Field Value
    Type Description
    BindableProperty

    LineBreakModeProperty

    backing store for LineBreakMode property

    Declaration
    public static readonly BindableProperty LineBreakModeProperty
    Field Value
    Type Description
    BindableProperty

    LinesProperty

    backing store for Lines property

    Declaration
    public static readonly BindableProperty LinesProperty
    Field Value
    Type Description
    BindableProperty

    MinFontSizeProperty

    backing store for MinFontSize property

    Declaration
    public static readonly BindableProperty MinFontSizeProperty
    Field Value
    Type Description
    BindableProperty

    OrientationProperty

    Backing store for the Orienation property

    Declaration
    public static readonly BindableProperty OrientationProperty
    Field Value
    Type Description
    BindableProperty

    PaddingProperty

    Identifies the Padding bindable property.

    Declaration
    public static readonly BindableProperty PaddingProperty
    Field Value
    Type Description
    BindableProperty

    SelectedBackgroundColorProperty

    Backing store for the Selected.BackgroundColor property.

    Declaration
    public static readonly BindableProperty SelectedBackgroundColorProperty
    Field Value
    Type Description
    BindableProperty

    SelectedFontColorProperty

    OBSOLETE: Use SelectedTextColorProperty

    Declaration
    [Obsolete("Use SelectedTextColorProperty")]
    public static readonly BindableProperty SelectedFontColorProperty
    Field Value
    Type Description
    BindableProperty

    SelectedTextColorProperty

    The selected text color property.

    Declaration
    public static readonly BindableProperty SelectedTextColorProperty
    Field Value
    Type Description
    BindableProperty

    SeparatorWidthProperty

    The backing store for the MaterialSegmentControl's SeparatorWidth property.

    Declaration
    public static readonly BindableProperty SeparatorWidthProperty
    Field Value
    Type Description
    BindableProperty

    SoundEffectModeProperty

    Backing store for the sound effect mode property.

    Declaration
    public static readonly BindableProperty SoundEffectModeProperty
    Field Value
    Type Description
    BindableProperty

    SoundEffectProperty

    The backing store for the sound effect property.

    Declaration
    public static readonly BindableProperty SoundEffectProperty
    Field Value
    Type Description
    BindableProperty

    StickyBehaviorProperty

    OBSOLETE: Use ToggleBehaviorProperty instead.

    Declaration
    [Obsolete("StickyBehavior property is obsolete, use ToggleBehavior instead", true)]
    public static BindableProperty StickyBehaviorProperty
    Field Value
    Type Description
    BindableProperty

    SyncSegmentFontSizesProperty

    The size segment fonts equally property.

    Declaration
    public static readonly BindableProperty SyncSegmentFontSizesProperty
    Field Value
    Type Description
    BindableProperty

    TextColorProperty

    Backing store for the TextColor bindable property.

    Declaration
    public static readonly BindableProperty TextColorProperty
    Field Value
    Type Description
    BindableProperty

    TintIconProperty

    The tint image property backing store.

    Declaration
    public static readonly BindableProperty TintIconProperty
    Field Value
    Type Description
    BindableProperty

    TintImageProperty

    OBSOLETE: Use TintIconProperty

    Declaration
    [Obsolete("Use TintIconProperty", true)]
    public static readonly BindableProperty TintImageProperty
    Field Value
    Type Description
    BindableProperty

    TrailingIconProperty

    Backing store for the trailing image property.

    Declaration
    public static readonly BindableProperty TrailingIconProperty
    Field Value
    Type Description
    BindableProperty

    TrailingImageProperty

    OBSOLETE: Use TrailingIconProperty

    Declaration
    [Obsolete("Use TrailingIconProperty")]
    public static readonly BindableProperty TrailingImageProperty
    Field Value
    Type Description
    BindableProperty

    VerticalTextAlignmentProperty

    Backing store for the vertical text alignment property.

    Declaration
    public static readonly BindableProperty VerticalTextAlignmentProperty
    Field Value
    Type Description
    BindableProperty

    Properties

    AutoFit

    Gets/Sets the AutoFit property

    Declaration
    public AutoFit AutoFit { get; set; }
    Property Value
    Type Description
    AutoFit

    BackgroundColor

    Gets or sets the color of the background.

    Declaration
    public Color BackgroundColor { get; set; }
    Property Value
    Type Description
    Color

    The color of the background.

    DarkTheme

    Gets or sets a value indicating whether this Button if for a dark theme.

    Declaration
    public bool DarkTheme { get; set; }
    Property Value
    Type Description
    Boolean

    true if dark theme; otherwise, false.

    FontAttributes

    Gets or sets the font attributes.

    Declaration
    public FontAttributes FontAttributes { get; set; }
    Property Value
    Type Description
    FontAttributes

    The font attributes.

    FontColor

    OBSOLETE: Use TextColor

    Declaration
    [Obsolete("Use TextColor")]
    public Color FontColor { get; set; }
    Property Value
    Type Description
    Color

    The color of the font.

    FontFamily

    Gets or sets the font family.

    Declaration
    public string FontFamily { get; set; }
    Property Value
    Type Description
    String

    The font family.

    FontSize

    Gets or sets the size of the font.

    Declaration
    public double FontSize { get; set; }
    Property Value
    Type Description
    Double

    The size of the font.

    GroupToggleBehavior

    Gets or sets the MaterialSegmentControl's Toggle behavior.

    Declaration
    public GroupToggleBehavior GroupToggleBehavior { get; set; }
    Property Value
    Type Description
    GroupToggleBehavior

    The Toggle behavior (None, Radio, Multiselect).

    HapticEffect

    Gets or sets the haptic effect.

    Declaration
    public HapticEffect HapticEffect { get; set; }
    Property Value
    Type Description
    HapticEffect

    The haptic effect.

    HapticEffectMode

    Gets or sets the haptic mode.

    Declaration
    public EffectMode HapticEffectMode { get; set; }
    Property Value
    Type Description
    EffectMode

    The haptic mode.

    HasTightSpacing

    Gets or sets if the Icon/Image is close (TightSpacing) to text or at edge (not TightSpacing) of button.

    Declaration
    public bool HasTightSpacing { get; set; }
    Property Value
    Type Description
    Boolean

    true if has tight spacing; otherwise, false.

    HorizontalTextAlignment

    Gets or sets the horizontal text alignment.

    Declaration
    public TextAlignment HorizontalTextAlignment { get; set; }
    Property Value
    Type Description
    TextAlignment

    The horizontal text alignment.

    IconColor

    controls value of .IconColor property

    Declaration
    public Color IconColor { get; set; }
    Property Value
    Type Description
    Color

    IconFontFamily

    Sets the font used for rendering the IconText

    Declaration
    public string IconFontFamily { get; set; }
    Property Value
    Type Description
    String

    IconFontSize

    controls value of .IconFontSize property

    Declaration
    public double IconFontSize { get; set; }
    Property Value
    Type Description
    Double

    IntraSegmentOrientation

    Gets or sets the orientation of elements within the segments.

    Declaration
    public StackOrientation IntraSegmentOrientation { get; set; }
    Property Value
    Type Description
    StackOrientation

    The orientation of the elements within the segments.

    IntraSegmentSpacing

    Gets or sets the intra segment spacing.

    Declaration
    public double IntraSegmentSpacing { get; set; }
    Property Value
    Type Description
    Double

    The intra segment spacing.

    IsClipped

    Gets or sets a value indicating whether any of the contents of this SegmentedControl is clipped.

    Declaration
    public bool IsClipped { get; }
    Property Value
    Type Description
    Boolean

    true if is clipped; otherwise, false.

    IsLongPressEnabled

    Gets or sets a value indicating whether this SegmentedControl has long press enabled.

    Declaration
    public bool IsLongPressEnabled { get; set; }
    Property Value
    Type Description
    Boolean

    true if is long press enabled; otherwise, false.

    LineBreakMode

    Gets/Sets the LineBreakMode property

    Declaration
    public LineBreakMode LineBreakMode { get; set; }
    Property Value
    Type Description
    LineBreakMode

    Lines

    Gets/Sets the Lines property

    Declaration
    public int Lines { get; set; }
    Property Value
    Type Description
    Int32

    MinFontSize

    Gets/Sets the MinFontSize property

    Declaration
    public double MinFontSize { get; set; }
    Property Value
    Type Description
    Double

    Orientation

    controls the orientation of the segments relative to eachother

    Declaration
    public StackOrientation Orientation { get; set; }
    Property Value
    Type Description
    StackOrientation

    Padding

    Gets or sets the padding for SegmentedControl's segments.

    Declaration
    public Thickness Padding { get; set; }
    Property Value
    Type Description
    Thickness

    The Thickness values for the layout. The default value is a Thickness with all values set to 0.

    Segments

    The container for the Segmented Control's buttons.

    Declaration
    public IList<Segment> Segments { get; set; }
    Property Value
    Type Description
    IList<Segment>

    The buttons.

    SelectedBackgroundColor

    Gets or sets the background color used when selected.

    Declaration
    public Color SelectedBackgroundColor { get; set; }
    Property Value
    Type Description
    Color

    The selected background.

    SelectedFontColor

    OBSOLETE: Use SelectedTextColor property

    Declaration
    [Obsolete("Use SelectedTextColor")]
    public Color SelectedFontColor { get; set; }
    Property Value
    Type Description
    Color

    The color of the selected font.

    SelectedIndexes

    Gets the selected index(es).

    Declaration
    public List<int> SelectedIndexes { get; }
    Property Value
    Type Description
    List<Int32>

    The selected index(es).

    SelectedSegments

    Gets the selected segments(s).

    Declaration
    public List<Segment> SelectedSegments { get; }
    Property Value
    Type Description
    List<Segment>

    The selected segment(s).

    SelectedTextColor

    Gets or sets the color of the selected font.

    Declaration
    public Color SelectedTextColor { get; set; }
    Property Value
    Type Description
    Color

    The color of the selected font.

    SeparatorWidth

    Gets or sets the width of the separator. Uses OutlineWidth by default (-1).

    Declaration
    public float SeparatorWidth { get; set; }
    Property Value
    Type Description
    Single

    The width of the separator.

    SoundEffect

    Gets or sets the sound effect played when a segment is tapped

    Declaration
    public SoundEffect SoundEffect { get; set; }
    Property Value
    Type Description
    SoundEffect

    The sound effect.

    SoundEffectMode

    Gets or sets the sound effect is perfomed when a segment is tapped

    Declaration
    public EffectMode SoundEffectMode { get; set; }
    Property Value
    Type Description
    EffectMode

    The sound effect mode.

    StickyBehavior

    OBSOLETE: Use ToggleBehavior instead.

    Declaration
    [Obsolete("StickyBehavior property is obsolete, use ToggleBehavior instead", true)]
    public bool StickyBehavior { get; set; }
    Property Value
    Type Description
    Boolean

    SyncSegmentFontSizes

    Gets or sets a value indicating whether this SegmentedControl size segment fonts equally.

    Declaration
    public bool SyncSegmentFontSizes { get; set; }
    Property Value
    Type Description
    Boolean

    true if size segment fonts equally; otherwise, false.

    TextColor

    Gets or sets the color of the font.

    Declaration
    public Color TextColor { get; set; }
    Property Value
    Type Description
    Color

    The color of the font.

    TintIcon

    Will the TextColor be applied to the IconImage image?

    Declaration
    public bool TintIcon { get; set; }
    Property Value
    Type Description
    Boolean

    true tint IconImage image with TextColor; otherwise, false.

    TintImage

    OBSOLETE: Use TintIcon property

    Declaration
    [Obsolete("Use TintIcon", true)]
    public bool TintImage { get; set; }
    Property Value
    Type Description
    Boolean

    TrailingIcon

    Gets or sets if the image is to be rendered after the text.

    Declaration
    public bool TrailingIcon { get; set; }
    Property Value
    Type Description
    Boolean

    default=false

    TrailingImage

    OBSOLETE: Use TrailingIcon

    Declaration
    [Obsolete("Use TrailingIcon")]
    public bool TrailingImage { get; set; }
    Property Value
    Type Description
    Boolean

    VerticalTextAlignment

    Gets or sets the vertical text alignment.

    Declaration
    public TextAlignment VerticalTextAlignment { get; set; }
    Property Value
    Type Description
    TextAlignment

    The vertical text alignment.

    Methods

    CheckIsClipped(Double, Double)

    tests if the contents of a segment is clipped

    Declaration
    public bool CheckIsClipped(double width = -1, double height = -1)
    Parameters
    Type Name Description
    Double width
    Double height
    Returns
    Type Description
    Boolean

    DeselectAll()

    Deselects all segments.

    Declaration
    public void DeselectAll()

    DeselectIndex(Int32)

    Deselected the segment at index

    Declaration
    public void DeselectIndex(int index)
    Parameters
    Type Name Description
    Int32 index

    Dispose()

    Dispose of Forms9Patch.SegmentedControl element.

    Declaration
    public void Dispose()

    Dispose(Boolean)

    Dispose the specified disposing.

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    Boolean disposing

    Disposing.

    GetMinSize()

    What is the smallest that this control can be rendered (labels are 1 line)

    Declaration
    public Size GetMinSize()
    Returns
    Type Description
    Size

    IsIndexSelected(Int32)

    Answers the question: Is an index selected?

    Declaration
    public bool IsIndexSelected(int index)
    Parameters
    Type Name Description
    Int32 index
    Returns
    Type Description
    Boolean

    LayoutChildren(Double, Double, Double, Double)

    Positions and sizes the children of a Layout.

    Declaration
    protected override void LayoutChildren(double x, double y, double width, double height)
    Parameters
    Type Name Description
    Double x

    A value representing the x coordinate of the child region bounding box.

    Double y

    A value representing the y coordinate of the child region bounding box.

    Double width

    A value representing the width of the child region bounding box.

    Double height

    A value representing the height of the child region bounding box.

    Overrides
    ManualLayout.LayoutChildren(Double, Double, Double, Double)
    Remarks

    Implementors wishing to change the default behavior of a Layout should override this method. It is suggested to still call the base method and modify its calculated results.

    OnBindingContextChanged()

    Called when BindingContext is changed

    Declaration
    protected override void OnBindingContextChanged()
    Overrides
    View.OnBindingContextChanged()

    OnMeasure(Double, Double)

    Processes a measurement request

    Declaration
    protected override SizeRequest OnMeasure(double widthConstraint, double heightConstraint)
    Parameters
    Type Name Description
    Double widthConstraint
    Double heightConstraint
    Returns
    Type Description
    SizeRequest
    Overrides
    ManualLayout.OnMeasure(Double, Double)

    OnPropertyChanged(String)

    Call this method from a child class to notify that a change happened on a property.

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

    The name of the property that changed.

    Overrides
    ManualLayout.OnPropertyChanged(String)

    SelectAll()

    Selects all segments

    Declaration
    public void SelectAll()

    SelectIndex(Int32)

    Selects the segment at index.

    Declaration
    public void SelectIndex(int index)
    Parameters
    Type Name Description
    Int32 index

    segment index.

    TapIndex(Int32)

    Taps the index.

    Declaration
    public void TapIndex(int index)
    Parameters
    Type Name Description
    Int32 index

    Index.

    Events

    SegmentLongPressed

    Occurs when segment long pressed.

    Declaration
    public event SegmentedControlEventHandler SegmentLongPressed
    Event Type
    Type Description
    SegmentedControlEventHandler

    SegmentLongPressing

    Occurs when segment long pressing.

    Declaration
    public event SegmentedControlEventHandler SegmentLongPressing
    Event Type
    Type Description
    SegmentedControlEventHandler

    SegmentSelected

    Occurs when one of the segments is selected.

    Declaration
    public event SegmentedControlEventHandler SegmentSelected
    Event Type
    Type Description
    SegmentedControlEventHandler

    SegmentTapped

    Occurs when one of the segments is tapped.

    Declaration
    public event SegmentedControlEventHandler SegmentTapped
    Event Type
    Type Description
    SegmentedControlEventHandler

    Implements

    System.ComponentModel.INotifyPropertyChanged
    Xamarin.Forms.IAnimatable
    Xamarin.Forms.ITabStopElement
    Xamarin.Forms.IViewController
    Xamarin.Forms.IVisualElementController
    Xamarin.Forms.IElementController
    Xamarin.Forms.Internals.IGestureController
    Xamarin.Forms.IGestureRecognizers
    Xamarin.Forms.ILayout
    Xamarin.Forms.ILayoutController
    Xamarin.Forms.IViewContainer<T>
    ILayout
    IBackground
    IShape
    IElement
    ILabelStyle
    IFontElement
    System.IDisposable

    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