NonActiveWindowTitleBrush屬性可以設置WPF窗體在失去焦點後的標題欄顏色,一般默認設置爲"Gray",但可在xaml文件中進行修改,改爲其他顏色,如:
<Window x:Class="Acrophone.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
BorderBrush="{DynamicResourceAccentColorBrush}" BorderThickness="1"
Height="500" Width="350" MinHeight="500" MinWidth="350" WindowStartupLocation="CenterScreen"
TitlebarHeight="40"
NonActiveWindowTitleBrush=" Red">
設置NonActiveWindowTitleBrush="Red",窗體失去焦點後會變爲紅色。