Skip to content

ControlExtensions.BindSelectedDate method (1 of 4)

Binds the selected date to an observable value.

public static Calendar BindSelectedDate(this Calendar calendar, ObservableValue<DateTime?> source)
parameter description
calendar Target calendar.
source Observable source.

The calendar for chaining.

Sets: Calendar.SelectedDate, DatePicker.SelectedDate


ControlExtensions.BindSelectedDate method (2 of 4)

Section titled “ControlExtensions.BindSelectedDate method (2 of 4)”

Binds the selected date to an observable value.

public static DatePicker BindSelectedDate(this DatePicker datePicker,
ObservableValue<DateTime?> source)
parameter description
datePicker Target date picker.
source Observable source.

The date picker for chaining.


ControlExtensions.BindSelectedDate<TSource> method (3 of 4)

Section titled “ControlExtensions.BindSelectedDate<TSource> method (3 of 4)”

Binds the selected date to a converted observable value.

public static Calendar BindSelectedDate<TSource>(this Calendar calendar,
ObservableValue<TSource> source, Func<TSource, DateTime?> convert,
Func<DateTime?, TSource>? convertBack = null)
parameter description
TSource Source value type.
calendar Target calendar.
source Observable source.
convert Source-to-date converter.
convertBack Optional date-to-source converter.

The calendar for chaining.


ControlExtensions.BindSelectedDate<TSource> method (4 of 4)

Section titled “ControlExtensions.BindSelectedDate<TSource> method (4 of 4)”

Binds the selected date to a converted observable value.

public static DatePicker BindSelectedDate<TSource>(this DatePicker datePicker,
ObservableValue<TSource> source, Func<TSource, DateTime?> convert,
Func<DateTime?, TSource>? convertBack = null)
parameter description
TSource Source value type.
datePicker Target date picker.
source Observable source.
convert Source-to-date converter.
convertBack Optional date-to-source converter.

The date picker for chaining.