This is a migrated thread and some comments may be shown as answers.

Missing default template (Windows 7 theme)

5 Answers 188 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
Igor Stefanovic
Top achievements
Rank 1
Igor Stefanovic asked on 31 May 2011, 07:37 PM
Hi

I am trying to override template for Rad Date Picker but in themes folder I can only find template for Rad Date Time Picker. I don't know if I should apply that template on RadDataPicker. Even if I extract template using Blend (ver. 3) I still get template for  Rad Date Time Picker.

Also Windows 7 themes distributed with setup RadControls_for_WPF_35_2011_1_0419_Dev are out of date for some controls and image resources are missing.

Regards,
Igor

5 Answers, 1 is accepted

Sort by
0
Accepted
Dani
Telerik team
answered on 01 Jun 2011, 08:04 AM
Hello Igor,

The correct RadDatePicker template is contained in the RadDateTimePicker resources file. Since 2010 Q2 (14th July 2010), RadDatePicker, RadTimePicker and RadDateTimePicker share the same control template, because of the nature of the controls themselves. Using a RadDateTimePicker with InputMode set to one of the three possible values is basically the same as using one of the three separate controls.

That said, it is fully safe for you to use either the RadDateTimePicker.xaml resources distributed with the installation, or generate the template in Expression Blend.

All resources for RadControls_for_WPF_35_2011_1_0419_Dev for Windows7 theme must be in place and up to date. Please, share which images you are unable to find and for which controls in particular.


All the best,
Dani
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Igor Stefanovic
Top achievements
Rank 1
answered on 01 Jun 2011, 01:03 PM
Thanks, I will use Date Time Picker template.

As for outdated templates... I I tried to build custom them based on Windows 7 theme but there were many small problems when you try to build it for all controls. For example in scheduler template you have image resource:     

<ImageSource x:Key="reccurrImage" >
        Images/rec_black.png
    </ImageSource>

In Teleric.Windows.Controls.xaml you have reference to non existing resource and that's not only missing reference:
<ResourceDictionary Source="/Telerik.Windows.Themes.Windows7;Component/Themes/Windows7/GroupBox.xaml" />

Also for Date Time Picker template I was getting error that IsReadOnly property of Rad Watermark Text Box doesn't exist (I don't know if template was looking in outdated assembly or I was doing something wrong) . Also I was unable to load Gauge template since it was reporting error that it can't load name spaces:
xmlns:gauge="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Gauge,Version=2011.1.0419.35,Culture=neutral,PublicKeyToken=5803cfa389c90ce7"
    xmlns:gauges="clr-namespace:Telerik.Windows.Controls.Gauges;assembly=Telerik.Windows.Controls.Gauge,Version=2011.1.0419.35,Culture=neutral,PublicKeyToken=5803cfa389c90ce7"
     
In one word Windows 7 themes were not usable out of the box. Some problems are obviously related to outdated or wrong templates (where you have dead resource links for example) and some are maybe related to me missing something (I can send you my theme project if you want to investigate). One thing I noticed that was different than in example for custom theme implementation was that I was forced to specify assembly for my custom theme namespace. Otherwise type of my theme class was not recognized in templates.

Any way on the end I give up on custom theme not because of the problems but because it seems like project is starting slower if you use custom themes and also it was easier to just override what you need without thinking if you are going to reference all necessary resources. 

Regards
Igor
0
Dani
Telerik team
answered on 02 Jun 2011, 09:10 AM
Hello Igor,

Thank you for the detailed description of the issues you encountered.

First of all, let me point that custom themes for WPF are more difficult to assemble and to maintain than that for Silverlight. I would suggest that you turn to using a custom theme for any RadControl only as a last possible option for customization. It is perfectly possible to simply use implicit styles to apply your customizations. Furthermore, the good news for WPF is that the Windows7 theme will get applied, and only after that the implicit Styles will get applied building look and feel upon the theme, and not overriding it.

Another important matter is that the external themes distibuted in the Themes directory of the Installation folder are intended for Silverlight usage mainly. At this point resources for RadControls for WPF are located in the same assembly as the control itself, rather than in an external theme. Shortly, external themes are not used for RadControls for WPF. This has been planned, but is not yet available. As a result, indeed there are resources missing  - GroupBox, ScheduleView. They are not outdated or wrong, but are indeed intentionally missing. You can always get these resources from Expression Blend. However, if you need those files as resource dictionaries namely, please, contact our support team , we are ready to fully assist you in creating a custom theme with all needed resources.

Image resources on the other hand are differently set for Silverlight and for WPF intentionally. For Silverlight , a full absolute path is used, but WPF needs them to be set relatively for the purpose of loading the resources correctly. So, if you have a path like "Images/rec_black.png", you will need to manually change that to "/Telerik.Windows.Controls.Scheduler;component/Themes/Office/Images/rec_black.png".

We are sorry if the creating and using a custom theme caused difficulties in your development process. I would really suggest that you go the other way round, instead - use simply implicit styles for your RadControls. If you need assistance along the way, feel free to submit any inquiries.


Best wishes,
Dani
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Eric
Top achievements
Rank 1
answered on 29 Jun 2011, 10:19 AM
Hello Dani,

I was just searching for help about the subject "WPF RadControls Theming" and I have found your interesting message.
I am trying to create a custom theme for your wpf radcontrols since a few days and I have a lots of problems, controls that are invisible, files that are missing.... I am in contact with one of your colleague, but she never told me that your theming mechanism does not work correctly for wpf. She even send me a little example showing how to create a theme and apply it with the style manager. For the missing file, I had to download the source code and build it but the build failed...
I found your theming mechanism very nice and easier to use than modifying the styles generated by Expression Blend, so I am very disapointed that it does not work correctly because I wanted to use it in a relative big project that I am just beginning.
What are your plan for the future? Will the theming mechanism work for wpf? If I work with impicit styles, how difficult will it be to upgrade my code with your next releases? I have already seen in other messages, that there are sometimes big changes between two releases.
The problem that I also see is that if I use implicit styles, I always need Expression Blend, for instance just to set a default color ?

Regards,
Eric
0
Dani
Telerik team
answered on 04 Jul 2011, 09:07 AM
Hi Eric,

The theming mechanism for RadControls does work successfully both for SIlverlight and WPF. The difference comes from the distribution of resources - as earlier stated, resources for Silverlight version of the controls are contained in external themes , and resources for WPF version of the controls are contained in the same assembly as the control.

You can safely use a custom theme for large scale project. The only drawback is that indeed it is more difficult to maintain. Although rarely will there be a breaking change introduced, when there is, you will need to apply it in the XAML resources for the relevant control. Of course, you can always count on our support team for assistance and you can get the theme updated even if you do not have deep knowledge of XAML.

Using implicit or explicit styles is actually not relevant to whether you develop your UI via Expression Blend, or by coding in Visual Studio. If you do not wish to use Blend, you can just assemble a custom theme project in VisualStudio and take care of the theme being applied to RadControls.

If your custom theme project does not build successfully, please share a sample project or a snippet. We will assist you fully to get it working.

All the best,
Dani
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
DatePicker
Asked by
Igor Stefanovic
Top achievements
Rank 1
Answers by
Dani
Telerik team
Igor Stefanovic
Top achievements
Rank 1
Eric
Top achievements
Rank 1
Share this question
or