첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
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
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요