How can I set style for titleBar which is applied WindowChrome

WPF Studio, Themes, and Shared Library for WPF Forum

Posted 5 years ago by Joshua Li
Version: 13.1.0581

How can I set style for titleBar which is applied WindowChrome, like background or title's fontsize? THX~

Comments (1)

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

Hi Joshua,

The title bar TextBlock is defined as:

<TextBlock x:Name="titleBarText" Grid.Column="1" Margin="0,2"
			Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=Title}" 
			FontFamily="{DynamicResource {x:Static SystemFonts.CaptionFontFamilyKey}}"
			FontSize="{DynamicResource {x:Static SystemFonts.CaptionFontSizeKey}}"
			FontStyle="{DynamicResource {x:Static SystemFonts.CaptionFontStyleKey}}"
			FontWeight="{DynamicResource {x:Static themes:AssetResourceKeys.WindowTitleBarFontWeightKey}}"
			Foreground="{DynamicResource {x:Static themes:AssetResourceKeys.WindowTitleBarForegroundActiveBrushKey}}"
			TextTrimming="CharacterEllipsis" RenderOptions.ClearTypeHint="Enabled"
			VerticalAlignment="Center" themes:WindowChrome.ElementKind="TitleBar" />

Some of those assets you can override in your App.Resources.  But you can't do the size unless you clone the templates.  We can give you the templates once you are a customer.

The title bar background can be changed by redefining this asset in your App.Resources:

{DynamicResource {x:Static themes:AssetResourceKeys.WindowTitleBarBackgroundActiveBrushKey}}

Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.