Setting DisplayMode of Calendar in DatePicker control

Oct 22, 2009 at 3:12 PM
Edited Oct 22, 2009 at 3:13 PM


In an application i'm currently working on, i'm trying to set the DisplayMode of the Calendar control in the DatePicker control.

However, whatever i try to set as it's value, the DisplayMode always remains 'Month'.

For example, the following code doesn't work, even when i set the value of the Setter to either 'Year' of 'Decade', instead of the binding:

        <Style TargetType="{x:Type toolkit:Calendar}">
            <Setter Property="DisplayMode" Value="{Binding CalendarDisplayMode}" />

Is this expected behavior?


Feb 6, 2010 at 4:05 PM
Edited Feb 6, 2010 at 4:25 PM

Did you find a solution yet?  For calendar control we can handle DisplayModeChanged event to set the DisplayMode as Year; however for datepicker we don't have a way to route the event