첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.

728x90
반응형
728x170

TestProject.zip
0.01MB

▶ MainApplication.xaml

<Application x:Class="TestProject.MainApplication"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    StartupUri="MainWindow.xaml">
    <Application.Resources>
        <!--ResourceDictionary Source="/PresentationFramework.Classic, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=MSIL;component/themes/classic.xaml" /-->
        <!--ResourceDictionary Source="/PresentationFramework.Aero, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=MSIL;component/themes/aero.normalcolor.xaml" /-->
        <!--ResourceDictionary Source="/PresentationFramework.Luna, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=MSIL;component/themes/luna.metallic.xaml" /-->
        <!--ResourceDictionary Source="/PresentationFramework.Luna, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=MSIL;component/themes/luna.homestead.xaml" /-->
        <ResourceDictionary Source="/PresentationFramework.Royale, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=MSIL;component/themes/royale.normalcolor.xaml" />
    </Application.Resources>
</Application>

 

728x90

 

▶ MainWindow.xaml

<Window x:Class="TestProject.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Width="800"
    Height="600"
    Title="ResourceDictionary 엘리먼트 : Source 속성을 사용해 특정 윈도우즈 테마 설정하기"
    FontFamily="나눔고딕코딩"
    FontSize="16">
    <Grid>
        <StackPanel
            HorizontalAlignment="Center"
            VerticalAlignment="Center">
            <Button
                Width="100"
                Height="30"
                Content="Test" />
            <StackPanel
                HorizontalAlignment="Center"
                Margin="0 10 0 0"
                Orientation="Horizontal">
                <RadioButton Content="예" />
                <RadioButton
                    Margin="10 0 0 0"
                    Content="아니오"  />
            </StackPanel>
            <ListBox
                Margin="0 10 0 0"
                Width="200"
                Height="100">
                <TextBlock>서울</TextBlock>
                <TextBlock>인천</TextBlock>
                <TextBlock>수원</TextBlock>
                <TextBlock>대전</TextBlock>
                <TextBlock>대구</TextBlock>
                <TextBlock>울산</TextBlock>
                <TextBlock>광주</TextBlock>
                <TextBlock>부산</TextBlock>
            </ListBox>
        </StackPanel>
    </Grid>
</Window>

※ PresentationFramework.Aero 어셈블리를 참조한다.

728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요