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

Custom theme errors with 2010 Q2 release

4 Answers 47 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Morgan McCollough
Top achievements
Rank 1
Morgan McCollough asked on 18 Aug 2010, 04:03 PM
I just tried to build a custom theme using the theme source from th 2010 Q2 Office Blue theme. Initially, I got a bunch of errors from the Common.xaml file, and I had to remove those sections specific to WPF including all the tags that look like conditional compilation commands or something. Anyway, I was just wondering if that Common.xaml file is even necessary, or do you generate some of the theme files and that is a hold-over from your internal build process?

Once I got the theme to compile I got a runtime exception saying that a circular reference was detected in the merged dictionary. In order to get it to run, I had to comment out the reference to Telerik.Windows.Controls.Editor.xaml in my Generic.xaml file. Any idea what is happening there? I am assuming the source posted with the Q2 build is not quite the same as that used to build the actual Office Blue DLL.

It is basically working for me, I just thought you might be able to add some insight into these issues. Thanks!

4 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 20 Aug 2010, 07:35 AM
Hello Morgan McCollough,

Have you followed the steps in these help topics:

If yes, which one did you follow?

All the best,
Veselin Vasilev
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
Morgan McCollough
Top achievements
Rank 1
answered on 20 Aug 2010, 05:01 PM
It seems maybe I took the wrong approach. I followed the instructions I found on the forums and just adjusted for the recent release.
http://www.telerik.com/community/forums/silverlight/general-discussions/create-custom-theme-dll-for-q3-2009.aspx

I guess it didn't occur to me to look at the Silverlight docs because the last time I looked there was hardly anything there concerning custom themes (that was a while ago).

Basically, what I wanted to do was make some modifications to the Office Blue theme. But, I wanted those modifications to be part of source control in our project. I didn't want to just modify the Office Blue, rebuild it, and then reference it as a DLL in the app. I'm sure there will be more tweaks to make in the future and I thought it made sense to have a custom theme as part of the source of the project.

If I modify things to use the pattern in the second link you sent, how would I set things up to default to the Office Blue theme if things aren't found in mine?

Just so you know, the basic modifications I am currently looking to make are in the roll-over colors for the menus, disabled view of combo boxes, and maybe a few minor color changes in the GridView. I was also experimenting with changing the ReadOnly state of the TextBox so it looked like a label. I was doing this by getting rid of the border and making the background transparent, but control was still highlighting and turning white when I clicked on it, and I wasn't sure where that was coming from.

Thanks for your help!
0
Vanya Pavlova
Telerik team
answered on 25 Aug 2010, 01:00 PM
Hi Morgan McCollough,

I have prepared an example for Q2 and you will see how to modify the slider as it is shown in our documentation help.
Please let me know if you need any further assistance.

Regards,
Vanya Pavlova
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
Morgan McCollough
Top achievements
Rank 1
answered on 27 Aug 2010, 08:37 PM
Thanks for the example. Using this I have managed to set up a theme that more or less inherits from Office Blue. Basically, I copied over all of the top-level files from the Office Blue theme source (like Telerik.Windows.Controls.Input.xaml) and then only modified the resource inclusion statements that pertained to the controls I wanted to modify. That way my theme only contains styles for controls I wanted to modify, like ComboBox. I'm assuming that was the right approach.

Before I copied over those top-level files, I could not get the theme to work as an application level theme. It would work when I assigned it to a specific control, but I just kept getting COM exceptions at run-time if I tried to use it as an application-level theme.

Anyway, thanks again.
Tags
General Discussions
Asked by
Morgan McCollough
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Morgan McCollough
Top achievements
Rank 1
Vanya Pavlova
Telerik team
Share this question
or