■ 커스텀 윈도우 크롬을 사용하는 방법을 보여준다.
[TestProject 프로젝트]
▶ Window1.xaml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
<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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
<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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
<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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
<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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
<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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
using TestLibrary; namespace TestProject { /// <summary> /// 윈도우 5 /// </summary> public partial class Window5 : CustomChromeWindow { //////////////////////////////////////////////////////////////////////////////////////////////////// Constructor ////////////////////////////////////////////////////////////////////////////////////////// Public #region 생성자 - Window5() /// <summary> /// 생성자 /// </summary> public Window5() { InitializeComponent(); } #endregion } } |
▶ MainWindow.xaml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
<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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
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 } } |