728x90
반응형
728x170
▶ MainApplication.xaml
...
<Application.Resources>
<ResourceDictionary>
<Style x:Key="ButtonForegroundStyleKey">
<Setter Property="Button.Foreground" Value="Yellow" />
</Style>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="MyResources1.xaml" />
<ResourceDictionary Source="MyResources2.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
...
728x90
▶ MyResource1.xaml
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="ButtonForegroundStyleKey">
<Setter Property="Button.Foreground" Value="Red" />
</Style>
</ResourceDictionary>
300x250
▶ MyResource2.xaml
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="ButtonForegroundStyleKey">
<Setter Property="Button.Foreground" Value="Blue" />
</Style>
</ResourceDictionary>
728x90
반응형
그리드형(광고전용)
'C# > WPF' 카테고리의 다른 글
[C#/WPF] x:TypeArguments 속성 사용하기 (0) | 2014.01.11 |
---|---|
[C#/WPF] InkCanvas 클래스 : XAML 데이터 저장하기 (0) | 2014.01.10 |
[C#/WPF] InkCanvas 클래스 : ISF 데이터 저장하기 (0) | 2014.01.10 |
[C#/WPF] InkCanvas 클래스 : 데이터 로드하기 (0) | 2014.01.10 |
[C#/WPF] Tablet 클래스 : Tablet 장치 설치 여부 조사하기 (0) | 2014.01.10 |
[C#/WPF] ResourceDictionary 엘리먼트 : 리소스 병합하기 (0) | 2014.01.10 |
[C#/WPF] x:Key 속성 : x:Static 태그 확장을 사용해 시스템 리소스 재정의 하기 (0) | 2014.01.10 |
[C#/WPF] StaticResource 태그 확장 : x:Static 태그 확장을 사용해 시스템 리소스 사용하기 (0) | 2014.01.10 |
[C#/WPF] DynamicResource 태그 확장 : 정적 속성 값 사용하기 (0) | 2014.01.10 |
[C#/WPF] DynamicResource 엘리먼트 : 정적 속성 값 사용하기 (0) | 2014.01.10 |
[C#/WPF] StaticResource 태그 확장 : 리소스 사용하기 (0) | 2014.01.10 |
댓글을 달아 주세요