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

Windows 7 theme and header height

6 Answers 90 Views
Window
This is a migrated thread and some comments may be shown as answers.
Trude
Top achievements
Rank 2
Trude asked on 09 May 2012, 09:26 AM
See attached screenshot.
With the default theme (office black) two controls can stack and the header stretches accordingly (the rowdefinition is set to auto in the control template)
With the windows 7 theme it seems that there is a fixed height? Is this intentional? I'm unable to edit the windows 7 control template in blend (blend forces it into office black).

6 Answers, 1 is accepted

Sort by
0
Trude
Top achievements
Rank 2
answered on 09 May 2012, 09:31 AM
Simply adjusting the fontsize in the header clips the text ... this must be a bug?
0
Dani
Telerik team
answered on 11 May 2012, 08:15 AM
Hi Jorn ,

You are absolutely right. The control templates for Office Black theme and Windows7 theme are different by design. The header discrepancy however affects the functionality of RadWindow in a way that seems wrong at this point. We will further test and consider changing this part of RadWindow design for Windows7. Thank you for your appreciated feedback.

Meanwhile, I attach here a demonstrative sample of how this behavior can be worked-around. You can search for NOTE in Telerik.Windows.Control.Navigation.xaml file to check the modified spots. I hope it will be helpful.

All the best,
Dani
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Trude
Top achievements
Rank 2
answered on 11 May 2012, 08:58 AM
Can you tell why there is such a difference in design? It seems that it's only the Windows 7 theme that is affected by this.
And the fix is so simple - only two properties in the one xaml file. If you just change these are there other things that will break? Please see if you can implement this for production - in Windows 7 (the OS) almost all windows have headers with controls in them. 

Anyway, I'm prepared to implement your workaround (for now) if it can be done efficiently. Do I need to add more files than just Telerik.Windows.Control.Navigation.xaml to my project? Will this increase the size of my project (I assume the compiled project is no bigger)? I see you have commented out the Stylemanager line in mainpage - is there a reason for that?

Thanks for your efforts!
0
Trude
Top achievements
Rank 2
answered on 11 May 2012, 10:18 AM
I had a look in the \Themes.Implicit\Windows7\ folder and changed the two lines you noted in the Telerik.Windows.Control.Navigation.xaml file (height and margin). The theme project was then compiled and I copied/referenced the Telerik.Windows.Themes.Windows7.dll to my own project. Everything worked fine except that my windows has NO headers now :) All other controls are styled/themed correctly (Windows 7). I even made some small adjustments to other controls in the theme project and those changes carried over just fine.

Can I do it this way? I thought it was a quick way since I only need to set the theme via the stylemanager.
0
Trude
Top achievements
Rank 2
answered on 11 May 2012, 10:56 AM
Ok, I found out what you had left out in your notes. Some rowdefinitions, rowspans etc. I compiled the theme project again and referenced the dll in my project and it works now :)

Anyway, please make this part of the theme by default!
0
Trude
Top achievements
Rank 2
answered on 05 Sep 2012, 12:11 PM
Update if anyone is interested; The Windows 7 theme now has a dynamic header size by default - so no need for custom stuff. Good job!
Tags
Window
Asked by
Trude
Top achievements
Rank 2
Answers by
Trude
Top achievements
Rank 2
Dani
Telerik team
Share this question
or