RadDatePicker not working correctly when style is set

454 views Asked by At

I have Telerik RadDatePicker in my xaml. I want to change ControlTemplate, but when I extract the copy of default style (from telerik:Office_BlackTheme) the RadDatePicker stops working correctly.

<telerik:RadDatePicker x:Name="trnDate"               
                    Height="25"
                    MinWidth="220"
                    Margin="0,5,0,5"
                    VerticalAlignment="Center"
                    VerticalContentAlignment="Center"
                    BorderThickness="1"                                   
                    TodayButtonVisibility="Hidden" Style="{DynamicResource RadDatePickerStyle}" />

When I open this RadDatePicker in Blend for Visual studio and choose option Edit Template --> Edit a copy for RadDatePicker, its functionality is not working correctly. enter image description here

Example: If I choose years from 2030 to 2040 this is opened: enter image description here

The style is automatically generated in Blend. It is too big to post that code here.

1

There are 1 answers

0
thatguy On BEST ANSWER

Although you can extract styles for controls using Blend or Visual Studio according to the offical documentation, sometimes this process fails and the styles and control templates are corrupt and do not work as expected.

If you encounter this, you can always fall back to extracting resources manually. Install the target version of the Telerik UI for WPF from your Telerik account and go to this directory on your file system.

C:\Program Files (x86)\Progress\<Your Telerik Version Folder>\Themes.Implicit\WPF40

There you will find a folder for each theme which contains XAML files that define the resources for each control. The XAML files are named like the assemblies that contain the corresponding controls.

See these topics from the official documentation for reference: