wpf でNavigationWindowの背景色を変えたいです。
App.xamlでこのようにしました。
xaml
1<Application x:Class="SampleProject.App" 2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 3 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 4 StartupUri="MainWindow.xaml"> 5 <Application.Resources> 6 <SolidColorBrush x:Key="Brush1" Color="DarkSlateGray" /> 7 8 <Style TargetType="NavigationWindow"> 9 <Setter Property="Background" Value= "{DynamicResource Brush1}" /> 10 </Style> 11 12 </Application.Resources> 13</Application> 14
TargetTypeの値をGridなど他のものにすると上手くいくのですがNavigationWindowにするとうまくいきませんなぜでしょうか?
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2019/03/07 07:43