0
나는 내 app.xaml이 넣어 여러 제어 파생 된 형식에 대한 전역 스타일을 설정하려고 :WPF- 왜 이러한 스타일이 작동하지 않습니까?
<Style TargetType="{x:Type Control}">
<Setter Property="Background" Value="{Binding BackgroundBrush, Source={x:Static m:Settings.Instance}, UpdateSourceTrigger=PropertyChanged}" />
<Setter Property="Foreground" Value="{Binding ForegroundBrush, Source={x:Static m:Settings.Instance}, UpdateSourceTrigger=PropertyChanged}" />
<Setter Property="BorderBrush" Value="{Binding ForegroundBrush, Source={x:Static m:Settings.Instance}, UpdateSourceTrigger=PropertyChanged}" />
<Setter Property="UseLayoutRounding" Value="True" />
</Style>
<Style TargetType="{x:Type Window}" BasedOn="{StaticResource {x:Type Control}}" />
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Control}}" />
현재 창 스타일은 비주얼 스튜디오 디자인 창에서 작동하고 버튼 스타일 아무튼 ' 전혀 일하지 않는다. 나는 무엇을 잘못 했는가?
어떤 버전의 Visual Studio 및 .NET Framework를 사용하고 있습니까? 나는 .NET 4.0 (WPF 4.0)에서 작동하는 스타일을 얻는 데 어려움을 겪고있다. http://stackoverflow.com/questions/4239714/why-cant-i-style-a-control-with-the-aero-theme-applied-in-wpf-4-0을 참조하십시오. – devuxer