Created
February 13, 2021 13:25
-
-
Save SnowyPainter/cbe6ea65d041495ce75a1c1d94d3ae27 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Window x:Class="Epe.xaml.MainWindow" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:local="clr-namespace:Epe.xaml" | |
mc:Ignorable="d" | |
WindowStyle="None" MinHeight="400" MinWidth="850" Height="600" Width="1200" Icon="/Images/ICON.ico"> | |
<Grid> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="30"/> | |
<RowDefinition Height="*"/> | |
</Grid.RowDefinitions> | |
<Grid x:Name="TitleBar" Style="{StaticResource TitleBar}" MouseDown="TitleBar_MouseDown" Grid.Row="0"> | |
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> | |
<StackPanel.Resources> | |
<Style TargetType="TextBlock"> | |
<Setter Property="TextAlignment" Value="Center"/> | |
<Setter Property="VerticalAlignment" Value="Center"/> | |
<Setter Property="Foreground" Value="{StaticResource White}"/> | |
<Setter Property="Margin" Value="10,0,0,0"/> | |
</Style> | |
</StackPanel.Resources> | |
<Image Source="/Images/icon.ico" Width="35"/> | |
<TextBlock Text="Title"/> | |
</StackPanel> | |
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right"> | |
<Button x:Name="MinimizeButton" Content="ㅡ" Width="35" Margin="0" Click="MinimizeButton_Click"/> | |
<Button x:Name="CloseButton" Content="X" Width="35" Margin="0" Click="CloseButton_Click"/> | |
</StackPanel> | |
</Grid> | |
<Grid Grid.Row="1" VerticalAlignment="Stretch"> | |
<Grid.ColumnDefinitions> | |
<ColumnDefinition Width="4*"/> | |
<ColumnDefinition Width="1*"/> | |
</Grid.ColumnDefinitions> | |
<Grid.Resources> | |
<Style TargetType="StackPanel"> | |
<Setter Property="HorizontalAlignment" Value="Stretch"/> | |
<Setter Property="VerticalAlignment" Value="Stretch"/> | |
</Style> | |
</Grid.Resources> | |
<Grid HorizontalAlignment="Stretch" Grid.Column="0"> | |
<StackPanel Orientation="Vertical"> | |
</StackPanel> | |
</Grid> | |
<Grid HorizontalAlignment="Stretch" Grid.Column="1"> | |
<StackPanel Orientation="Vertical"> | |
</StackPanel> | |
</Grid> | |
</Grid> | |
</Grid> | |
</Window> | |
/* | |
private void TitleBar_MouseDown(object sender, MouseButtonEventArgs e) => this.DragMove(); | |
private void MinimizeButton_Click(object sender, RoutedEventArgs e) => this.WindowState = WindowState.Minimized; | |
private void CloseButton_Click(object sender, RoutedEventArgs e) => this.Close(); | |
/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment