menu

Xamarin.Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfSegmentItem - Xamarin.Forms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SfSegmentItem

    Represents a single element in SfSegmentedControl View. It contains the properties to configure title and content region.

    Inheritance
    System.Object
    SfSegmentItem
    Implements
    System.ComponentModel.INotifyPropertyChanged
    Namespace: Syncfusion.XForms.WPF.Buttons
    Assembly: Syncfusion.Buttons.XForms.WPF.dll
    Syntax
    public class SfSegmentItem : ContentControl, INotifyPropertyChanged

    Constructors

    SfSegmentItem()

    Declaration
    public SfSegmentItem()

    Fields

    FontIconFontFamilyProperty

    Identifies the FontIconFontFamily .

    Declaration
    public static readonly DependencyProperty FontIconFontFamilyProperty
    Field Value
    Type
    System.Windows.DependencyProperty
    Remarks

    This is read-only.

    IconFontProperty

    Identifies the IconFont .

    Declaration
    public static readonly DependencyProperty IconFontProperty
    Field Value
    Type
    System.Windows.DependencyProperty
    Remarks

    This is read-only.

    TextProperty

    Identifies the Text .

    Declaration
    public static readonly DependencyProperty TextProperty
    Field Value
    Type
    System.Windows.DependencyProperty
    Remarks

    This is read-only.

    TitleFontAttributesProperty

    Identifies the FontAttributes .

    Declaration
    public static readonly DependencyProperty TitleFontAttributesProperty
    Field Value
    Type
    System.Windows.DependencyProperty
    Remarks

    This is read-only.

    TitleFontFamilyProperty

    Identifies the TitleFontFamily .

    Declaration
    public static readonly DependencyProperty TitleFontFamilyProperty
    Field Value
    Type
    System.Windows.DependencyProperty
    Remarks

    This is read-only.

    Properties

    BackgroundColor

    Gets or sets the background color value for the segment item.

    Declaration
    public Brush BackgroundColor { get; set; }
    Property Value
    Type
    System.Windows.Media.Brush

    FontIconFontColor

    Gets or sets the value for the color of font icon text for a segment item.

    Declaration
    public Brush FontIconFontColor { get; set; }
    Property Value
    Type
    System.Windows.Media.Brush

    FontIconFontFamily

    Gets or sets the value for the font family of icon font text for a segment item.

    Declaration
    public FontFamily FontIconFontFamily { get; set; }
    Property Value
    Type
    System.Windows.Media.FontFamily

    FontIconFontSize

    Gets or sets the value for the font size of icon font text for a segment item.

    Declaration
    public double FontIconFontSize { get; set; }
    Property Value
    Type
    System.Double

    FormsSegmentItem

    Gets or sets the forms Segment item.

    Declaration
    public SfSegmentItem FormsSegmentItem { get; set; }
    Property Value
    Type Description
    SfSegmentItem

    The forms Segment item.

    IconFont

    Gets or sets the value for the font icon text for a Segment item.

    Declaration
    public string IconFont { get; set; }
    Property Value
    Type
    System.String

    IsEnabled

    Gets or sets the value to choose whether the segment item is enabled or not.

    Declaration
    public bool IsEnabled { get; set; }
    Property Value
    Type
    System.Boolean

    SelectionBackgroundColor

    Gets or sets the background color value for the selected segment item.

    Declaration
    public SolidColorBrush SelectionBackgroundColor { get; set; }
    Property Value
    Type
    System.Windows.Media.SolidColorBrush

    SelectionTextColor

    Gets or sets the color value for the selection text of segment item.

    Declaration
    public Brush SelectionTextColor { get; set; }
    Property Value
    Type
    System.Windows.Media.Brush

    Text

    Gets or sets the value for the text of Segment item.

    Declaration
    public string Text { get; set; }
    Property Value
    Type
    System.String

    TitleFontAttributes

    Gets or sets the value for the font representation of title font text for a tab header.

    Declaration
    public FontStyle TitleFontAttributes { get; set; }
    Property Value
    Type
    System.Windows.FontStyle
    Remarks

    It is not applicable for most of the font icons.

    TitleFontColor

    Gets or sets the value for the color of text for a segment item.

    Declaration
    public Brush TitleFontColor { get; set; }
    Property Value
    Type
    System.Windows.Media.Brush

    TitleFontFamily

    Gets or sets the value for the font representation of text for a segment item.

    Declaration
    public FontFamily TitleFontFamily { get; set; }
    Property Value
    Type
    System.Windows.Media.FontFamily

    TitleFontSize

    Gets or sets the value for the font size of text for a segment item.

    Declaration
    public double TitleFontSize { get; set; }
    Property Value
    Type
    System.Double

    Methods

    MeasureOverride(Size)

    On measure the SfSegmentItem

    Declaration
    protected override Size MeasureOverride(Size availableSize)
    Parameters
    Type Name Description
    System.Windows.Size availableSize

    available size of segment item.

    Returns
    Type Description
    System.Windows.Size

    It returns available size of SfSegment item

    OnApplyTemplate()

    Apply template to SfSegmentItem

    Declaration
    public override void OnApplyTemplate()

    OnMouseUp(MouseButtonEventArgs)

    On tapped event args

    Declaration
    protected override void OnMouseUp(MouseButtonEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs e

    RaiseOnPropertyChanged(String)

    This method is called by the Set accessor of each property. The CallerMemberName attribute that is applied to the optional propertyName parameter causes the property name of the caller to be substituted as an argument.

    Declaration
    protected virtual void RaiseOnPropertyChanged(string propertyName = null)
    Parameters
    Type Name Description
    System.String propertyName

    String type

    Events

    PropertyChanged

    Declaration
    public event PropertyChangedEventHandler PropertyChanged
    Event Type
    Type
    System.ComponentModel.PropertyChangedEventHandler

    Implements

    System.ComponentModel.INotifyPropertyChanged
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved