콘텐츠로 이동

ControlExtensions.BindSelectedIndex method (1 of 7)

이 콘텐츠는 아직 번역되지 않았습니다.

Binds the selected index to an observable value.

public static ComboBox BindSelectedIndex(this ComboBox comboBox, ObservableValue<int> source)
parameter description
comboBox Target combo box.
source Observable source.

The combo box for chaining.

Sets: ComboBox.SelectedIndex, ListBox.SelectedIndex, NavigationList.SelectedIndex, SegmentedControl.SelectedIndex


ControlExtensions.BindSelectedIndex method (2 of 7)

Section titled “ControlExtensions.BindSelectedIndex method (2 of 7)”

Binds the selected index to an observable value.

public static ListBox BindSelectedIndex(this ListBox listBox, ObservableValue<int> source)
parameter description
listBox Target list box.
source Observable source.

The list box for chaining.


ControlExtensions.BindSelectedIndex method (3 of 7)

Section titled “ControlExtensions.BindSelectedIndex method (3 of 7)”

Binds the selected index to an observable value.

public static NavigationList BindSelectedIndex(this NavigationList control,
ObservableValue<int> source)
parameter description
control Target navigation list.
source Observable source.

The navigation list for chaining.


ControlExtensions.BindSelectedIndex method (4 of 7)

Section titled “ControlExtensions.BindSelectedIndex method (4 of 7)”

Binds the selected index to an observable value.

public static SegmentedControl BindSelectedIndex(this SegmentedControl control,
ObservableValue<int> source)
parameter description
control Target segmented control.
source Observable source.

The control for chaining.


ControlExtensions.BindSelectedIndex<TSource> method (5 of 7)

Section titled “ControlExtensions.BindSelectedIndex<TSource> method (5 of 7)”

Binds the selected index to a converted observable value.

public static ComboBox BindSelectedIndex<TSource>(this ComboBox comboBox,
ObservableValue<TSource> source, Func<TSource, int> convert,
Func<int, TSource>? convertBack = null)
parameter description
TSource Source value type.
comboBox Target combo box.
source Observable source.
convert Source-to-index converter.
convertBack Optional index-to-source converter.

The combo box for chaining.


ControlExtensions.BindSelectedIndex<TSource> method (6 of 7)

Section titled “ControlExtensions.BindSelectedIndex<TSource> method (6 of 7)”

Binds the selected index to a converted observable value.

public static ListBox BindSelectedIndex<TSource>(this ListBox listBox,
ObservableValue<TSource> source, Func<TSource, int> convert,
Func<int, TSource>? convertBack = null)
parameter description
TSource Source value type.
listBox Target list box.
source Observable source.
convert Source-to-index converter.
convertBack Optional index-to-source converter.

The list box for chaining.


ControlExtensions.BindSelectedIndex<TSource> method (7 of 7)

Section titled “ControlExtensions.BindSelectedIndex<TSource> method (7 of 7)”

Binds the selected index to a converted observable value (e.g. an enum).

public static SegmentedControl BindSelectedIndex<TSource>(this SegmentedControl control,
ObservableValue<TSource> source, Func<TSource, int> convert,
Func<int, TSource>? convertBack = null)
parameter description
TSource Source value type.
control Target segmented control.
source Observable source.
convert Source-to-index converter.
convertBack Optional index-to-source converter.

The control for chaining.