Class
RadSegmentedControl

A segmented control is a horizontal control made of multiple segments, each segment functioning as a toggle button.

Definition

Constructors

RadSegmentedControl()

Initializes a new instance of the RadSegmentedControl class.

Declaration

cs-api-definition
public RadSegmentedControl()

Fields

DisplayMemberPathProperty

Identifies the DisplayMemberPath dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty DisplayMemberPathProperty

Field Value

DependencyProperty

ItemCommandProperty

Identifies the ItemCommand dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ItemCommandProperty

Field Value

DependencyProperty

ItemContainerStyleProperty

Identifies the ItemContainerStyle dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ItemContainerStyleProperty

Field Value

DependencyProperty

ItemContainerStyleSelectorProperty

Identifies the ItemContainerStyleSelector dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ItemContainerStyleSelectorProperty

Field Value

DependencyProperty

ItemTemplateProperty

Identifies the ItemTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ItemTemplateProperty

Field Value

DependencyProperty

ItemTemplateSelectorProperty

Identifies the ItemTemplateSelector dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ItemTemplateSelectorProperty

Field Value

DependencyProperty

ItemsSourceProperty

Identifies the ItemsSource dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ItemsSourceProperty

Field Value

DependencyProperty

SegmentWidthModeProperty

Identifies the SegmentWidthMode dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SegmentWidthModeProperty

Field Value

DependencyProperty

SelectedIndexProperty

Identifies the SelectedIndex property.

Declaration

cs-api-definition
public static readonly DependencyProperty SelectedIndexProperty

Field Value

DependencyProperty

SelectedItemProperty

Identifies the SelectedItem property.

Declaration

cs-api-definition
public static readonly DependencyProperty SelectedItemProperty

Field Value

DependencyProperty

SelectedValuePathProperty

Identifies the SelectedValuePath property.

Declaration

cs-api-definition
public static readonly DependencyProperty SelectedValuePathProperty

Field Value

DependencyProperty

SelectedValueProperty

Identifies the SelectedValue property.

Declaration

cs-api-definition
public static readonly DependencyProperty SelectedValueProperty

Field Value

DependencyProperty

SeparatorBrushProperty

Identifies the SeparatorBrush dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SeparatorBrushProperty

Field Value

DependencyProperty

SeparatorWidthProperty

Identifies the SeparatorWidth dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SeparatorWidthProperty

Field Value

DependencyProperty

Properties

AnimationLayer

Gets a base layer where the end-user can add and animate custom elements utilizing the SegmentAnimationContextChanged event.

Declaration

cs-api-definition
public Canvas AnimationLayer { get; }

Property Value

Canvas

DisplayMemberPath

Gets or sets a path to a value on the source object to serve as the visual representation of the object.

Declaration

cs-api-definition
public string DisplayMemberPath { get; set; }

Property Value

string

ItemCommand

Gets or sets the command that is executed when an auto-generated segment is pressed.

Declaration

cs-api-definition
public ICommand ItemCommand { get; set; }

Property Value

ICommand

ItemContainerStyle

Gets or sets the Style that is applied to the container element generated for each item.

Declaration

cs-api-definition
public Style ItemContainerStyle { get; set; }

Property Value

Style

ItemContainerStyleSelector

Gets or sets custom style-selection logic for a style that can be applied to each generated container element.

Declaration

cs-api-definition
public StyleSelector ItemContainerStyleSelector { get; set; }

Property Value

StyleSelector

ItemTemplate

Gets or sets the DataTemplate used to display each item.

Declaration

cs-api-definition
public DataTemplate ItemTemplate { get; set; }

Property Value

DataTemplate

ItemTemplateSelector

Gets or sets the custom logic for choosing a template used to display each item.

Declaration

cs-api-definition
public DataTemplateSelector ItemTemplateSelector { get; set; }

Property Value

DataTemplateSelector

Items

Gets the collection used to generate the content of the RadSegmentedControl.

Declaration

cs-api-definition
public IList<object> Items { get; }

Property Value

IList<object>

ItemsSource

Gets or sets a collection used to generate the content of the RadSegmentedControl.

Declaration

cs-api-definition
public IEnumerable ItemsSource { get; set; }

Property Value

IEnumerable

SegmentWidthMode

Gets or sets the width mode of the segments.

Declaration

cs-api-definition
public SegmentWidthMode SegmentWidthMode { get; set; }

Property Value

SegmentWidthMode

SelectedIndex

Gets or sets the zero-based index of the currently selected item.

Declaration

cs-api-definition
public int SelectedIndex { get; set; }

Property Value

int

SelectedItem

Gets or sets the first item in the current selection or returns null if the selection is empty.

Declaration

cs-api-definition
public object SelectedItem { get; set; }

Property Value

object

SelectedValue

Gets or sets the value of the SelectedItem, obtained by using SelectedValuePath.

Declaration

cs-api-definition
public object SelectedValue { get; set; }

Property Value

object

SelectedValuePath

Gets or sets the path that is used to get the SelectedValue from the SelectedItem.

Declaration

cs-api-definition
public string SelectedValuePath { get; set; }

Property Value

string

SeparatorBrush

Gets or sets the brush that defines the background of the separators between the segments.

Declaration

cs-api-definition
public Brush SeparatorBrush { get; set; }

Property Value

Brush

SeparatorWidth

Gets or sets the width of the separators between the segments.

Declaration

cs-api-definition
public double SeparatorWidth { get; set; }

Property Value

double

Methods

ApplyTemplateCore()

Called when the Framework is called. Inheritors should override this method should they have some custom template-related logic. This is done to ensure that the property is properly initialized.

Declaration

cs-api-definition
protected override bool ApplyTemplateCore()

Returns

bool

Overrides RadControl.ApplyTemplateCore()

IsSegmentEnabled(int)

Returns bool value that indicates if the Segment is enabled.

Declaration

cs-api-definition
public bool IsSegmentEnabled(int index)

Parameters

index

int

Returns

bool

OnCreateAutomationPeer()

Declaration

cs-api-definition
protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

Overrides RadControl.OnCreateAutomationPeer()

OnIsEnabledChanged(bool, bool)

Called when the IsEnabled property has changed.

Declaration

cs-api-definition
protected override void OnIsEnabledChanged(bool newValue, bool oldValue)

Parameters

newValue

bool

oldValue

bool

Overrides RadControl.OnIsEnabledChanged(bool, bool)

OnTemplateApplied()

Occurs when the method has been called and the template is already successfully applied.

Declaration

cs-api-definition
protected override void OnTemplateApplied()

Overrides RadControl.OnTemplateApplied()

SetSegmentEnabled(int, bool)

Set the Enable state of the Segment.

Declaration

cs-api-definition
public void SetSegmentEnabled(int index, bool isEnabled)

Parameters

index

int

isEnabled

bool

UnapplyTemplateCore()

Removes the current control template. Occurs when a template has already been applied and a new one is applied.

Declaration

cs-api-definition
protected override void UnapplyTemplateCore()

Overrides RadControl.UnapplyTemplateCore()

Events

SegmentAnimationContextChanged

Occurs when the layout slot or the visual state of a child Segment has changed.

Declaration

cs-api-definition
public event EventHandler<SegmentAnimationContextEventArgs> SegmentAnimationContextChanged

Event Value

EventHandler<SegmentAnimationContextEventArgs>

SelectionChanged

Occurs when the selection changes.

Declaration

cs-api-definition
public event SelectionChangedEventHandler SelectionChanged

Event Value

SelectionChangedEventHandler