This question is locked. New answers and comments are not allowed.
EDIT: Sorry, I accidentally posted this in WP8 -- I am using the Windows 8 controls. I can't seem to find a way to move or delete the original post, though :-)
Hello,
I am initializing a new instance of a RadDatePicker from C# code (i.e. "code-behind"), like so:
var control = new RadDatePicker();
control.SelectorHeader = "Foo";
// .. etc ..
However, when I set the SelectorHeader to a string, it does not show up in the selector popup. Instead, it will essentially do .ToString() on whatever the current DataContext is. When I set the SelectorHeader via XAML, like so:
<telerik:RadDatePicker ... SelectorHeader="Foo" ... />
It does work as expected. I've also tried setting a Binding, using control.SetBinding(RadDatePicker.SelectorHeaderProperty, ...), but that also fails. How can I set the SelectorHeader from code?
Cheers,
Siebe Tolsma
Hello,
I am initializing a new instance of a RadDatePicker from C# code (i.e. "code-behind"), like so:
var control = new RadDatePicker();
control.SelectorHeader = "Foo";
// .. etc ..
However, when I set the SelectorHeader to a string, it does not show up in the selector popup. Instead, it will essentially do .ToString() on whatever the current DataContext is. When I set the SelectorHeader via XAML, like so:
<telerik:RadDatePicker ... SelectorHeader="Foo" ... />
It does work as expected. I've also tried setting a Binding, using control.SetBinding(RadDatePicker.SelectorHeaderProperty, ...), but that also fails. How can I set the SelectorHeader from code?
Cheers,
Siebe Tolsma