Change the font in the window title bar

WPF Studio, Themes, and Shared Library for WPF Forum

Posted 10 years ago by Jack Stephenson
Version: 13.2.0591
Avatar

I want to change the font in the window Titlebar.

I am using a Metro Theme.

Thoughts?

---

Jack Stephenson

Comments (6)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Jack,

Right now the Window's template uses the SystemFonts.CaptionFontFamilyKey, CaptionFontSizeKey, and CaptionFontStyleKey.  So you should be able to do something like this as an example of changing font size:

<mscorlib:Double x:Key="{x:Static SystemFonts.CaptionFontSizeKey}">22</mscorlib:Double>


Actipro Software Support

Posted 10 years ago by Jack Stephenson
Avatar

So first, this forum doesnt seem to play well with IE 11.

Having trouble implementing your "something like" suggestion.

Where does this xaml go?

Is it something like that or exactly that?

Not  to be pedantic but could not apply your "answer" as you wrote it up.

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Jack,

If you put that XAML line in your Window.Resources (which probably will work for that single Window instance) or Application.Resources (which will apply to all Window instances), then that's all you'll need to do to change the font size.  You are effectively altering the caption font size resource that is used by our themed Window template with that line.

And you'd also need an xmlns at the top like this so that "mscorlib:" is defined:

xmlns:mscorlib="clr-namespace:System;assembly=mscorlib"

Also, what specific issues do you see with IE 11 in the forum?


Actipro Software Support

Posted 10 years ago by Jack Stephenson
Avatar

RE: The IE 11 problem pressing the Un Mark answer doesnt refresh the screen.

 

YOu souktion works thanks

Posted 10 years ago by Jack Stephenson
Avatar

your answer is very good. And I can set the font size.

Now how do I set font family?

I Tried this,

 

<Window.Resources>
<mscorlib:Double x:Key="{x:Static SystemFonts.CaptionFontSizeKey}">16</mscorlib:Double>
<FontFamily x:Key="{x:Static SystemFonts.CaptionFontFamily }">Showcard Gothic</FontFamily>
</Window.Resources>

 

size works, font family doesn't

Answer - Posted 10 years ago by Jack Stephenson
Avatar

Got it

 

SystemFonts.CaptionFontFamilyKey

The latest build of this product (v24.1.2) was released 1 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.