첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
본 블로그는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 블로그 콘텐츠 향상을 위해 쓰여집니다.

728x90
반응형
728x170

TestSolution.zip
다운로드

[TestProject 프로젝트]

▶ Window1.xaml

<Window x:Class="TestProject.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Width="800"
    Height="600"
    Title="윈도우 1 - 표준 크롬"
    FontFamily="나눔고딕코딩"
    FontSize="16">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="RESOURCE/GlassButton.xaml" />
                <ResourceDictionary Source="RESOURCE/GlassIcon.xaml"   />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition Height="*"    />
        </Grid.RowDefinitions>
        <Border Grid.RowSpan="2">
            <Border.Background>
                <LinearGradientBrush StartPoint="0.5 0" EndPoint="0.5 1">
                    <GradientStop Color="#99bbbbff" Offset="0" />
                    <GradientStop Color="#ff7777bb" Offset="1" />
                </LinearGradientBrush>
            </Border.Background>
        </Border>
        <Grid Grid.Row="1">
            <TextBlock Margin="10">
                표준 윈도우 크롬
            </TextBlock>
        </Grid>
    </Grid>
</Window>

 

▶ Window1.xaml.cs

using System.Windows;

namespace TestProject
{
    /// <summary>
    /// 윈도우 1
    /// </summary>
    public partial class Window1 : Window
    {
        //////////////////////////////////////////////////////////////////////////////////////////////////// Constructor
        ////////////////////////////////////////////////////////////////////////////////////////// Public

        #region 생성자 - Window1()

        /// <summary>
        /// 생성자
        /// </summary>
        public Window1()
        {
            InitializeComponent();
        }

        #endregion
    }
}

 

▶ Window2.xaml

<Window x:Class="TestProject.Window2"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    WindowStyle="None"
    Width="800"
    Height="600"
    Title="커스텀 윈도우 크롬 사용하기"
    FontFamily="나눔고딕코딩"
    FontSize="16">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="RESOURCE/GlassButton.xaml" />
                <ResourceDictionary Source="RESOURCE/GlassIcon.xaml"   />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition Height="*"    />
        </Grid.RowDefinitions>
        <Border Grid.RowSpan="2"
            CornerRadius="10 10 5 5"
            BorderBrush="LightSteelBlue"
            BorderThickness="3">
            <Border.Background>
                <LinearGradientBrush StartPoint="0.5 0" EndPoint="0.5 1">
                    <GradientStop Color="#99bbbbff" Offset="0" />
                    <GradientStop Color="#ff7777bb" Offset="1" />
                </LinearGradientBrush>
            </Border.Background>
        </Border>
        <Border
            Margin="{Binding Path=CaptionButtonMargin}"
            CornerRadius="10 10 0 0"
            BorderThickness="3 3 3 1"
            BorderBrush="LightSteelBlue">
            <Border.Background>
                <LinearGradientBrush StartPoint="0.5 0" EndPoint="0.5 1">
                    <GradientStop Color="#ffbbbbff" Offset="0" />
                    <GradientStop Color="#ff7777bb" Offset="1" />
                </LinearGradientBrush>
            </Border.Background>
            <StackPanel
                Margin="0"
                VerticalAlignment="Top"
                Orientation="Horizontal">
                <ContentControl
                    Style="{StaticResource GlassIcon}" 
                    Margin="7 3 5 5"
                    Width="35"
                    Height="35"
                    Background="#ff0000bb" />
                <TextBlock
                    VerticalAlignment="Center"
                    Foreground="#FF000044"
                    FontWeight="Bold"
                    FontSize="20"
                    Text="윈도우 2 - 크롬 없음" />
            </StackPanel>
        </Border>
        <Grid Grid.Row="1">
            <TextBlock Margin="10">
                WindowStyle="None"<LineBreak />
                표준 동작이 손실된다.<LineBreak />
                하지만 여전히 표준 크기 조정 테두리가 있다.<LineBreak />
                <LineBreak />
                <Button
                    Padding="5"
                    Click="closeButton_Click">
                    윈도우 종료 (ALT-F4)
                </Button>
            </TextBlock>
        </Grid>
    </Grid>
</Window>

 

▶ Window2.xaml.cs

using System.Windows;

namespace TestProject
{
    /// <summary>
    /// 윈도우 2
    /// </summary>
    public partial class Window2 : Window
    {
        //////////////////////////////////////////////////////////////////////////////////////////////////// Constructor
        ////////////////////////////////////////////////////////////////////////////////////////// Public

        #region 생성자 - Window2()

        /// <summary>
        /// 생성자
        /// </summary>
        public Window2()
        {
            InitializeComponent();
        }

        #endregion

        //////////////////////////////////////////////////////////////////////////////////////////////////// Method
        ////////////////////////////////////////////////////////////////////////////////////////// Private

        #region 종료 버튼 클릭시 처리하기 - closeButton_Click(sender, e)

        /// <summary>
        /// 종료 버튼 클릭시 처리하기
        /// </summary>
        /// <param name="sender">이벤트 발생자</param>
        /// <param name="e">이벤트 인자</param>
        private void closeButton_Click(object sender, RoutedEventArgs e)
        {
            Close();
        }

        #endregion
    }
}

 

▶ Window3.xaml

<Window x:Class="TestProject.Window3"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    WindowStyle="None"
    ResizeMode="NoResize"
    Width="800"
    Height="600"
    Title="커스텀 윈도우 크롬 사용하기"
    FontFamily="나눔고딕코딩"
    FontSize="16">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="RESOURCE/GlassButton.xaml" />
                <ResourceDictionary Source="RESOURCE/GlassIcon.xaml"   />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition Height="*"    />
        </Grid.RowDefinitions>
        <Border Grid.RowSpan="2"
            CornerRadius="10 10 5 5"
            BorderBrush="LightSteelBlue"
            BorderThickness="3">
            <Border.Background>
                <LinearGradientBrush StartPoint="0.5 0" EndPoint="0.5 1">
                    <GradientStop Color="#99bbbbff" Offset="0" />
                    <GradientStop Color="#ff7777bb" Offset="1" />
                </LinearGradientBrush>
            </Border.Background>
        </Border>
        <Border
            Margin="{Binding Path=CaptionButtonMargin}"
            CornerRadius="10 10 0 0"
            BorderThickness="3 3 3 1"
            BorderBrush="LightSteelBlue">
            <Border.Background>
                <LinearGradientBrush StartPoint="0.5 0" EndPoint="0.5 1">
                    <GradientStop Color="#ffbbbbff" Offset="0" />
                    <GradientStop Color="#ff7777bb" Offset="1" />
                </LinearGradientBrush>
            </Border.Background>
            <StackPanel
                Margin="0"
                VerticalAlignment="Top"
                Orientation="Horizontal">
                <ContentControl
                    Style="{StaticResource GlassIcon}" 
                    Margin="7 3 5 5"
                    Width="35"
                    Height="35"
                    Background="#ff0000bb" />
                <TextBlock
                    VerticalAlignment="Center"
                    Foreground="#FF000044"
                    FontWeight="Bold"
                    FontSize="20"
                    Text="윈도우 3 - 크기 변경 없음" />
            </StackPanel>
        </Border>
        <Grid Grid.Row="1">
            <TextBlock Margin="10">
                WindowStyle="None"<LineBreak />
                ResizeMode="NoResize"<LineBreak />
                이제 창에서 모든 표준 기능이 제거되었다.<LineBreak />
                <LineBreak />
                <Button
                    Padding="5"
                    Click="closeButton_Click">
                    윈도우 종료 (ALT-F4)
                </Button>
            </TextBlock>
        </Grid>
    </Grid>
</Window>

 

▶ Window3.xaml.cs

using System.Windows;

namespace TestProject
{
    /// <summary>
    /// 윈도우 3
    /// </summary>
    public partial class Window3 : Window
    {
        //////////////////////////////////////////////////////////////////////////////////////////////////// Constructor
        ////////////////////////////////////////////////////////////////////////////////////////// Public

        #region 생성자 - Window3()

        /// <summary>
        /// 생성자
        /// </summary>
        public Window3()
        {
            InitializeComponent();
        }

        #endregion

        //////////////////////////////////////////////////////////////////////////////////////////////////// Method
        ////////////////////////////////////////////////////////////////////////////////////////// Private

        #region 종료 버튼 클릭시 처리하기 - closeButton_Click(sender, e)

        /// <summary>
        /// 종료 버튼 클릭시 처리하기
        /// </summary>
        /// <param name="sender">이벤트 발생자</param>
        /// <param name="e">이벤트 인자</param>
        private void closeButton_Click(object sender, RoutedEventArgs e)
        {
            Close();
        }

        #endregion
    }
}

 

▶ Window4.xaml

<Window x:Class="TestProject.Window4"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:shell="http://schemas.microsoft.com/winfx/2006/xaml/presentation/shell"
    Width="800"
    Height="600"
    Title="커스텀 윈도우 크롬 사용하기"
    FontFamily="나눔고딕코딩"
    FontSize="16">
    <shell:WindowChrome.WindowChrome>
        <shell:WindowChrome
            CornerRadius="25 25 10 10"
            GlassFrameThickness="0"
            ResizeBorderThickness="6"
            CaptionHeight="43">
        </shell:WindowChrome>
    </shell:WindowChrome.WindowChrome>
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="RESOURCE/GlassButton.xaml" />
                <ResourceDictionary Source="RESOURCE/GlassIcon.xaml"   />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition Height="*"    />
        </Grid.RowDefinitions>
        <Border Grid.RowSpan="2"
            CornerRadius="10 10 5 5"
            BorderThickness="3"
            BorderBrush="LightSteelBlue">
            <Border.Background>
                <LinearGradientBrush StartPoint="0.5 0" EndPoint="0.5 1">
                    <GradientStop Color="#99bbbbff" Offset="0" />
                    <GradientStop Color="#ff7777bb" Offset="1" />
                </LinearGradientBrush>
            </Border.Background>
        </Border>
        <Border
            Margin="{Binding Path=CaptionButtonMargin}"
            CornerRadius="10 10 0 0"
            BorderThickness="3 3 3 1"
            BorderBrush="LightSteelBlue">
            <Border.Background>
                <LinearGradientBrush StartPoint="0.5 0" EndPoint="0.5 1">
                    <GradientStop Color="#ffbbbbff" Offset="0" />
                    <GradientStop Color="#ff7777bb" Offset="1" />
                </LinearGradientBrush>
            </Border.Background>
            <StackPanel
                Margin="0"
                VerticalAlignment="Top"
                Orientation="Horizontal">
                <ContentControl
                    Style="{StaticResource GlassIcon}"
                    Margin="7 3 5 5"
                    Width="35"
                    Height="35"
                    Background="#ff0000bb"
                    shell:WindowChrome.IsHitTestVisibleInChrome="True" />
                <TextBlock
                    VerticalAlignment="Center"
                    Foreground="#FF000044"
                    FontWeight="Bold"
                    FontSize="20"
                    Text="윈도우 4 - 커스텀 크롬" />
            </StackPanel>
        </Border>
        <Grid Grid.Row="1">
                <TextBlock Margin="10" >
                창을 이동하려면 클릭 및 드래그한다.<LineBreak />
                최대화하려면 맨 위로 드래그한다.<LineBreak />
                최대화하려면 더블 클릭한다.<LineBreak />
                시스템 메뉴를 보려면 마우스 오른쪽 버튼을 클릭한다.<LineBreak />
                하지만 캡션 버튼은 없다(최소/최대/종료).<LineBreak />
                <LineBreak />
                <Button
                    Padding="5"
                    Click="closeButton_Click">
                    윈도우 종료 (ALT-F4)
                </Button>
            </TextBlock>
        </Grid>
    </Grid>
</Window>

 

▶ Window4.xaml.cs

using System.Windows;

namespace TestProject
{
    /// <summary>
    /// 윈도우 4
    /// </summary>
    public partial class Window4 : Window
    {
        //////////////////////////////////////////////////////////////////////////////////////////////////// Constructor
        ////////////////////////////////////////////////////////////////////////////////////////// Public

        #region 생성자 - Window4()

        /// <summary>
        /// 생성자
        /// </summary>
        public Window4()
        {
            InitializeComponent();
        }

        #endregion

        //////////////////////////////////////////////////////////////////////////////////////////////////// Method
        ////////////////////////////////////////////////////////////////////////////////////////// Private

        #region 종료 버튼 클릭시 처리하기 - closeButton_Click(sender, e)

        /// <summary>
        /// 종료 버튼 클릭시 처리하기
        /// </summary>
        /// <param name="sender">이벤트 발생자</param>
        /// <param name="e">이벤트 인자</param>
        private void closeButton_Click(object sender, RoutedEventArgs e)
        {
            Close();
        }

        #endregion
    }
}

 

▶ Window5.xaml

<library:CustomChromeWindow x:Class="TestProject.Window5"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:shell="http://schemas.microsoft.com/winfx/2006/xaml/presentation/shell"
    xmlns:library="clr-namespace:TestLibrary;assembly=TestLibrary"
    Width="800"
    Height="600"
    Title="커스텀 윈도우 크롬 사용하기"
    FontFamily="나눔고딕코딩"
    FontSize="16">
    <shell:WindowChrome.WindowChrome>
        <shell:WindowChrome
            CornerRadius="25 25 10 10"
            GlassFrameThickness="0"
            ResizeBorderThickness="6"
            CaptionHeight="43">
        </shell:WindowChrome>
    </shell:WindowChrome.WindowChrome>
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="RESOURCE/GlassButton.xaml" />
                <ResourceDictionary Source="RESOURCE/GlassIcon.xaml"   />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition Height="*"    />
        </Grid.RowDefinitions>
        <Border Grid.RowSpan="2"
            CornerRadius="10 10 5 5"
            BorderBrush="LightSteelBlue"
            BorderThickness="3">
            <Border.Background>
                <LinearGradientBrush StartPoint="0.5 0" EndPoint="0.5 1">
                    <GradientStop Color="#99bbbbff" Offset="0" />
                    <GradientStop Color="#ff7777bb" Offset="1" />
                </LinearGradientBrush>
            </Border.Background>
        </Border>
        <Border
            Margin="{Binding Path=CaptionButtonMargin}"
            CornerRadius="10 10 0 0"
            BorderBrush="LightSteelBlue"
            BorderThickness="3 3 3 1">
            <Border.Background>
                <LinearGradientBrush StartPoint="0.5 0" EndPoint="0.5 1">
                    <GradientStop Color="#ffbbbbff" Offset="0" />
                    <GradientStop Color="#ff7777bb" Offset="1" />
                </LinearGradientBrush>
            </Border.Background>
            <StackPanel
                VerticalAlignment="Top"
                Margin="0"
                Orientation="Horizontal">
                <library:WindowIcon
                    Style="{StaticResource GlassIcon}"
                    Margin="7 3 5 5"
                    Width="35"
                    Height="35"
                    Background="#ff0000bb" />
                <TextBlock
                    VerticalAlignment="Center"
                    Foreground="#FF000044"
                    FontWeight="Bold"
                    FontSize="20"
                    Text="윈도우 5 - 캡션 버튼" />
            </StackPanel>
        </Border>
        <library:CaptionButtons />
        <Grid Grid.Row="1">
            <TextBlock Margin="10">
                캡션 버튼이있는 완벽한 맞춤형 크롬.
            </TextBlock>
        </Grid>
    </Grid>
</library:CustomChromeWindow>

 

▶ Window5.xaml.cs

using TestLibrary;

namespace TestProject
{
    /// <summary>
    /// 윈도우 5
    /// </summary>
    public partial class Window5 : CustomChromeWindow
    {
        //////////////////////////////////////////////////////////////////////////////////////////////////// Constructor
        ////////////////////////////////////////////////////////////////////////////////////////// Public

        #region 생성자 - Window5()

        /// <summary>
        /// 생성자
        /// </summary>
        public Window5()
        {
            InitializeComponent();
        }

        #endregion
    }
}

 

▶ MainWindow.xaml

<library:CustomChromeWindow x:Class="TestProject.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:shell="http://schemas.microsoft.com/winfx/2006/xaml/presentation/shell"
    xmlns:library="clr-namespace:TestLibrary;assembly=TestLibrary"
    Width="800"
    Height="600"
    Title="커스텀 윈도우 크롬 사용하기"
    FontFamily="나눔고딕코딩"
    FontSize="16">
    <shell:WindowChrome.WindowChrome>
        <shell:WindowChrome
            CornerRadius="25 25 10 10"
            GlassFrameThickness="0"
            ResizeBorderThickness="6"
            CaptionHeight="43">
        </shell:WindowChrome>
    </shell:WindowChrome.WindowChrome>
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="RESOURCE/GlassButton.xaml" />
                <ResourceDictionary Source="RESOURCE/GlassIcon.xaml"   />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition Height="*"    />
        </Grid.RowDefinitions>
        <Border Grid.RowSpan="2"
            CornerRadius="10 10 5 5"
            BorderBrush="LightSteelBlue"
            BorderThickness="3">
            <Border.Background>
                <LinearGradientBrush StartPoint="0.5 0" EndPoint="0.5 1">
                    <GradientStop Color="#99bbbbff" Offset="0" />
                    <GradientStop Color="#ff7777bb" Offset="1" />
                </LinearGradientBrush>
            </Border.Background>
        </Border>
        <Border
            Margin="{Binding Path=CaptionButtonMargin}"
            CornerRadius="10 10 0 0"
            BorderBrush="LightSteelBlue"
            BorderThickness="3 3 3 1">
            <Border.Background>
                <LinearGradientBrush StartPoint="0.5 0" EndPoint="0.5 1">
                    <GradientStop Color="#ffbbbbff" Offset="0" />
                    <GradientStop Color="#ff7777bb" Offset="1" />
                </LinearGradientBrush>
            </Border.Background>
            <StackPanel
                Margin="0"
                VerticalAlignment="Top"
                Orientation="Horizontal">
                <library:WindowIcon
                    Style="{StaticResource GlassIcon}"
                    Margin="7 3 5 5"
                    Width="35"
                    Height="35"
                    Background="#ff0000bb" />
                <TextBlock
                    VerticalAlignment="Center"
                    Margin="10 0 0 0"
                    Foreground="#FF000044"
                    FontFamily="Calibri"
                    FontWeight="Bold"
                    FontSize="20"
                    Text="커스텀 윈도우 크롬 사용하기" />
            </StackPanel>
        </Border>
        <library:CaptionButtons />
        <Grid Grid.Row="1">
            <StackPanel VerticalAlignment="Center">
                <Button
                    Margin="5"
                    Width="220"
                    Padding="5"
                    HorizontalContentAlignment="Left"
                    Click="window1Button_Click">
                    윈도우 1 - 표준 크롬
                </Button>
                <Button
                    Margin="5"
                    Width="220"
                    Padding="5"
                    HorizontalContentAlignment="Left"
                    Click="window2Button_Click">
                    윈도우 2 - 크롬 없음
                </Button>
                <Button
                    Margin="5"
                    Width="220"
                    Padding="5"
                    HorizontalContentAlignment="Left"
                    Click="window3Button_Click">
                    윈도우 3 - 크기 변경 없음
                </Button>
                <Button
                    Margin="5"
                    Width="220"
                    Padding="5"
                    HorizontalContentAlignment="Left"
                    Click="window4Button_Click">
                    윈도우 4 - 커스텀 크롬
                </Button>
                <Button
                    Margin="5"
                    Width="220"
                    Padding="5"
                    HorizontalContentAlignment="Left"
                    Click="window5Button_Click">
                    윈도우 5 - 캡션 버튼
                </Button>
            </StackPanel>
        </Grid>
    </Grid>
</library:CustomChromeWindow>

 

▶ MainWindow.xaml.cs

using System.Windows;

using TestLibrary;

namespace TestProject
{
    /// <summary>
    /// 메인 윈도우
    /// </summary>
    public partial class MainWindow : CustomChromeWindow
    {
        //////////////////////////////////////////////////////////////////////////////////////////////////// Constructor
        ////////////////////////////////////////////////////////////////////////////////////////// Public

        #region 생성자 - MainWindow()

        /// <summary>
        /// 생성자
        /// </summary>
        public MainWindow()
        {
            InitializeComponent();

            DataContext = this;
        }

        #endregion

        //////////////////////////////////////////////////////////////////////////////////////////////////// Method
        ////////////////////////////////////////////////////////////////////////////////////////// Private

        #region 윈도우 1 버튼 클릭시 처리하기 - window1Button_Click(sender, e)

        /// <summary>
        /// 윈도우 1 버튼 클릭시 처리하기
        /// </summary>
        /// <param name="sender">이벤트 발생자</param>
        /// <param name="e">이벤트 인자</param>
        private void window1Button_Click(object sender, RoutedEventArgs e)
        {
            Window1 window = new Window1();

            window.Show();
        }

        #endregion
        #region 윈도우 2 버튼 클릭시 처리하기 - window2Button_Click(sender, e)

        /// <summary>
        /// 윈도우 2 버튼 클릭시 처리하기
        /// </summary>
        /// <param name="sender">이벤트 발생자</param>
        /// <param name="e">이벤트 인자</param>
        private void window2Button_Click(object sender, RoutedEventArgs e)
        {
            Window2 window = new Window2();

            window.Show();
        }

        #endregion
        #region 윈도우 3 버튼 클릭시 처리하기 - window3Button_Click(sender, e)

        /// <summary>
        /// 윈도우 3 버튼 클릭시 처리하기
        /// </summary>
        /// <param name="sender">이벤트 발생자</param>
        /// <param name="e">이벤트 인자</param>
        private void window3Button_Click(object sender, RoutedEventArgs e)
        {
            Window3 window = new Window3();

            window.Show();
        }

        #endregion
        #region 윈도우 4 버튼 클릭시 처리하기 - window4Button_Click(sender, e)

        /// <summary>
        /// 윈도우 4 버튼 클릭시 처리하기
        /// </summary>
        /// <param name="sender">이벤트 발생자</param>
        /// <param name="e">이벤트 인자</param>
        private void window4Button_Click(object sender, RoutedEventArgs e)
        {
            Window4 window = new Window4();

            window.Show();
        }

        #endregion
        #region 윈도우 5 버튼 클릭시 처리하기 - window5Button_Click(sender, e)

        /// <summary>
        /// 윈도우 5 버튼 클릭시 처리하기
        /// </summary>
        /// <param name="sender">이벤트 발생자</param>
        /// <param name="e">이벤트 인자</param>
        private void window5Button_Click(object sender, RoutedEventArgs e)
        {
            Window5 window = new Window5();

            window.Show();
        }

        #endregion
    }
}
728x90
반응형
그리드형
Posted by 사용자 icodebroker
TAG , ,

댓글을 달아 주세요