|
| 1 | +<Window x:Class="test_note.MainWindow" |
| 2 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 3 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 4 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 5 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 6 | + xmlns:local="clr-namespace:test_note" |
| 7 | + mc:Ignorable="d" |
| 8 | + Background="#212121" |
| 9 | + Title="Test-Note" Height="470" Width="800" |
| 10 | + WindowStyle="None" ResizeMode="CanMinimize" WindowState="Normal" WindowStartupLocation="CenterScreen" |
| 11 | + BorderBrush="White" BorderThickness="1"> |
| 12 | + <Window.Resources> |
| 13 | + <Storyboard x:Key="MyAnimation"> |
| 14 | + <!-- animation steps go here --> |
| 15 | + </Storyboard> |
| 16 | + <Style TargetType="Border"> |
| 17 | + <Setter Property="CornerRadius" Value="0" /> |
| 18 | + </Style> |
| 19 | + <Style x:Key="RectBorderStyle" TargetType="Rectangle"> |
| 20 | + <Setter Property="Focusable" Value="False" /> |
| 21 | + <Setter Property="Fill" Value="Transparent" /> |
| 22 | + <Setter Property="Tag" Value="{Binding RelativeSource={RelativeSource AncestorType=Window}}" /> |
| 23 | + <EventSetter Event="MouseLeftButtonDown" Handler="Resize_Init"/> |
| 24 | + <EventSetter Event="MouseLeftButtonUp" Handler="Resize_End"/> |
| 25 | + <EventSetter Event="MouseMove" Handler="Resizeing_Form"/> |
| 26 | + </Style> |
| 27 | + </Window.Resources> |
| 28 | + |
| 29 | + <Grid Cursor=""> |
| 30 | + |
| 31 | + <Rectangle Name="topLeftSizeGrip" Width="7" Height="7" HorizontalAlignment="Left" VerticalAlignment="Top" Cursor="SizeNWSE" Style="{StaticResource RectBorderStyle}" /> |
| 32 | + <Rectangle Name="bottomRightSizeGrip" Width="7" Height="7" HorizontalAlignment="Right" VerticalAlignment="Bottom" Cursor="SizeNWSE" Style="{StaticResource RectBorderStyle}" /> |
| 33 | + <Rectangle Name="topRightSizeGrip" Width="7" Height="7" HorizontalAlignment="Right" VerticalAlignment="Top" Cursor="SizeNESW" Style="{StaticResource RectBorderStyle}" /> |
| 34 | + <Rectangle Name="bottomLeftSizeGrip" Width="7" Height="7" HorizontalAlignment="Left" VerticalAlignment="Bottom" Cursor="SizeNESW" Style="{StaticResource RectBorderStyle}" Fill="Transparent" /> |
| 35 | + <Grid MouseDown="StackPanel_MouseDown" VerticalAlignment="Top" Margin="0" Background="#212121"> |
| 36 | + <Grid.ColumnDefinitions> |
| 37 | + <ColumnDefinition Width="Auto" /> |
| 38 | + <ColumnDefinition Width="*" /> |
| 39 | + <ColumnDefinition Width="Auto" /> |
| 40 | + </Grid.ColumnDefinitions> |
| 41 | + <Image x:Name="HeaderIcon" Grid.Column="0" Width="20" Height="20" Margin="5, 4, 5, 4" HorizontalAlignment="Left" /> |
| 42 | + <TextBlock x:Name="HeaderTitle" Grid.Column="1" Margin="5" TextAlignment="Left" Foreground="#FFFFFF" FontSize="13" HorizontalAlignment="Left" /> |
| 43 | + <StackPanel Grid.Column="2" VerticalAlignment="Top" Orientation="Horizontal" HorizontalAlignment="Right"> |
| 44 | + <Button x:Name="MinimizeButton" Style="{DynamicResource MinimizeButtonStyle}" Click="MinimizeWindow" KeyboardNavigation.IsTabStop="False" /> |
| 45 | + <Button x:Name="MaximizeButton" Style="{DynamicResource MaximizeButtonStyle}" Click="MaximizeClick" KeyboardNavigation.IsTabStop="False" /> |
| 46 | + <Button x:Name="CloseButton" Style="{DynamicResource CloseButtonStyle}" Click="CloseButton_Click" KeyboardNavigation.IsTabStop="False" /> |
| 47 | + </StackPanel> |
| 48 | + </Grid> |
| 49 | + |
| 50 | + <DockPanel Margin="0" Height="440" VerticalAlignment="Top"> |
| 51 | + <WrapPanel HorizontalAlignment="Left" DockPanel.Dock="Top" Margin="5,0,0,10"> |
| 52 | + <Label Name="Filename" Content="Undefined.txt" Foreground="White"/> |
| 53 | + <Button x:Name="btnOpenFile" Click="btnOpenFile_Click" Content="Open" Margin="4" Background="Transparent" Foreground="white" BorderThickness="0"/> |
| 54 | + <Button x:Name="btnSaveFile" Click="btnSaveFile_Click" Content="Save" Margin="4" Background="Transparent" Foreground="white" BorderThickness="0"/> |
| 55 | + <Button x:Name="btnSendFile" Click="btnSendFile_Click" Content="Send?" Margin="4" Background="Transparent" Foreground="white" BorderThickness="0"/> |
| 56 | + <TextBox Name="webhookInput" TextChanged="Webhook_Changed" Width="450" Height="16" Background="#2D2D2D" BorderThickness="0" Foreground="white" Visibility="Hidden"/> |
| 57 | + </WrapPanel> |
| 58 | + <TextBox Name="textWriter" TextChanged="Text_Changed" Background="#2D2D2D" BorderThickness="0" Foreground="white" TextWrapping="Wrap" AcceptsReturn="True"/> |
| 59 | + </DockPanel> |
| 60 | + <WrapPanel VerticalAlignment="Bottom"> |
| 61 | + <Label Name="line" Content="Line 0" Foreground="White"/> |
| 62 | + <Label Name="cols" Content="Col 0" Foreground="White"/> |
| 63 | + </WrapPanel> |
| 64 | + |
| 65 | + </Grid> |
| 66 | +</Window> |
0 commit comments