Vista theme set fontsize globel

2 posts, 0 answers
  1. Wang
    Wang avatar
    48 posts
    Member since:
    Oct 2011

    Posted 24 Nov 2016 Link to this post

    Hello,

    In my project I want to use Vista theme,How can I set fontsize globel  like office2013 VisualStudio2013 etc?

    eg:

    VisualStudio2013Palette.Palette.FontSizeS = 13;
    VisualStudio2013Palette.Palette.FontSize = 15;
    VisualStudio2013Palette.Palette.FontSizeL = 17;

    what should I do?

  2. Martin
    Admin
    Martin avatar
    105 posts

    Posted 28 Nov 2016 Link to this post

    Hi Wang,

    We do not provide a theme palette for the Vista theme, only for the newer themes (Windows8, Windows8Touch, VisualStudio2013, Office2013, Green, Office2016). Most of the controls do not have a set FontSize, so the system settings would be inherited in the controls.

    So if you set FontSize of the container of the controls (Grid, StackPanel, Window) it should propagate down to the controls' texts. Where there is no FontSize property present, you could use TextElement.FontSize instead (e.g. in a StackPanel). FontSize set to the Window should do the trick the same way a FontSize property of the theme Palette would do in the newer themes.

    Regards,
    Martin
    Telerik by Progress
    Telerik UI for WPF is ready for Visual Studio 2017 RC! Learn more.
Back to Top