Windows 7 theme and header height

7 posts, 0 answers
  1. Jorn
    Jorn avatar
    222 posts
    Member since:
    Jun 2009

    Posted 09 May 2012 Link to this post

    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).
  2. Jorn
    Jorn avatar
    222 posts
    Member since:
    Jun 2009

    Posted 09 May 2012 Link to this post

    Simply adjusting the fontsize in the header clips the text ... this must be a bug?
  3. DevCraft banner
  4. Dani
    Admin
    Dani avatar
    848 posts

    Posted 11 May 2012 Link to this post

    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 >>
  5. Jorn
    Jorn avatar
    222 posts
    Member since:
    Jun 2009

    Posted 11 May 2012 Link to this post

    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!
  6. Jorn
    Jorn avatar
    222 posts
    Member since:
    Jun 2009

    Posted 11 May 2012 Link to this post

    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.
  7. Jorn
    Jorn avatar
    222 posts
    Member since:
    Jun 2009

    Posted 11 May 2012 Link to this post

    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!
  8. Jorn
    Jorn avatar
    222 posts
    Member since:
    Jun 2009

    Posted 05 Sep 2012 Link to this post

    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!
Back to Top
DevCraft banner