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

Creating a Custom Theme Project - Using the Telerik Approach

3 Answers 101 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Nuno
Top achievements
Rank 1
Nuno asked on 22 Sep 2010, 03:22 PM

Hi all,

I created my own theme using the Telerik approach and I have three questions:

1 - If I want to use a RadControl (which I don't need to Style) on my SL App, do I have to add a XAML for him on my Custom Theme Class Library? I'm getting an error since I added a RadMap on my SL App and I don't have a XAML with it's ResourceDictionary on the Custom Theme Class Library, because I don't need to style it (e.g.: I don't have a '...\Themes\Map.xaml')

2 - Is it possible to minify assemblies like Telerik.Windows.Controls.Navigation.dll on my Class Library ? I would guess yes. I want to use a RadTileView from that assembly but I don't need the RadAlert, RadBook, RadWindow, etc, etc, etc.

3 -  MS Controls? Is it possible to create a Custom Theme for Telerik SL RadControls AND MS Controls?

Thank you.

Nuno Senica

3 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 27 Sep 2010, 03:45 PM
Hi Nuno,

As to first question:

For each of these assemblies you need to create a .xaml file (in this case the Telerik.Windows.Controls.DataVisualization.xaml file should be added to your project).

Please find attached image (map.png).

As to second question:

Yes, you can. Just go to http://minifier.telerik.com, upload the Navigation and Controls assemblies, select RadTileView and save the new assemblies, containing only RadTileView and the needed types from both assemblies.

As to last question:

Yes, you can make a custom themes for Telerik SL RadControls AND MS Controls. You can find our theme for MS control in the Telerik.Windows.Controls assembly.

Please find attached image (MsControls.png).

All the best,
Dimitrina
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
Nuno
Top achievements
Rank 1
answered on 29 Sep 2010, 04:57 PM

Hello Dimitrina,

Thank you for your reply.

I was able to make everything with exception to making Styles for MS Controls to work.

Instead of referencing Telerik's folder where I could find "System.Windows.Button.xaml", I copied it to my local Themes/Resources folder within my SL class library. (I'm packing all needed resources there)

In my System.Windows.xaml I have:

 

 

 

<ResourceDictionary.MergedDictionaries>

 

 

 

 

<ResourceDictionary Source="/CTTyMetrixTheme;component/Themes/Resources/System.Windows.Button.xaml" />

 

 

 

 

</ResourceDictionary.MergedDictionaries>

 


I changed a few properties in System.Windows.Button.xaml but it has no effect when running a project with a MS standard button...

Any ideas why?

Another question, what's the difference between using System.Windows.Button.xaml provided on Telerik's folder and creating a new Resource Dictionary with the default MS button style found on http://msdn.microsoft.com/en-us/library/cc278069(v=vs.95).aspx ?

Thank you very much.

Nuno Senica

0
Dimitrina
Telerik team
answered on 04 Oct 2010, 03:40 PM
Hello Nuno,

In order to apply your custom theme to the MS Button you can use the following:
<Button Content="Button" Width="150" Height="30" Margin="20" telerik:StyleManager.Theme="{StaticResource Theme}" VerticalAlignment="Top" HorizontalAlignment="Center" />

Also, there is no difference between the Button style provided in the System.Windows.Button.xaml and the one in the referenced article.

Please find attached an example.

If you have further questions please do not hesitate to ask us.
I hope this will help you.


Best wishes,
Dimitrina
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
General Discussions
Asked by
Nuno
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Nuno
Top achievements
Rank 1
Share this question
or