This repository has been archived by the owner on Dec 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml
94 lines (93 loc) · 6.2 KB
/
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
<Window x:Class="VRCMaker.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:VRCMaker"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
xmlns:hc="https://handyorg.github.io/handycontrol"
mc:Ignorable="d"
Title="VRCMaker" Height="600" Width="900" Top="0" MinHeight="480"
ResizeMode="NoResize" MinWidth="800" Background="Transparent"
AllowsTransparency="True" WindowStartupLocation="CenterScreen"
Icon="/Assets/Logo.png" TextOptions.TextFormattingMode="Ideal" WindowStyle="None">
<Window.Resources>
</Window.Resources>
<Border>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="38"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid Grid.Row="0" MouseMove="Grid_MouseMove" Background="{DynamicResource TitleBackground}">
<TextBlock Foreground="{DynamicResource TextForeground}" VerticalAlignment="Center" Margin="10,0,0,0" FontSize="18" FontFamily="Century Gothic">VRC Maker</TextBlock>
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
<Button Margin="0,1,1,0" x:Name="MinimizeButton" ToolTip="最小化">
<Button.Style>
<Style TargetType="{x:Type Button}">
<Setter Property="Width" Value="50"/>
<Setter Property="Height" Value="32"/>
<Setter Property="VerticalAlignment" Value="Top"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="MinimizeButtonElement" BorderThickness="0">
<ContentPresenter x:Name="MinimizeButtonContentPresenter" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="MinimizeButtonElement" Property="Background" Value="Gray"/>
<Setter TargetName="MinimizeButtonElement" Property="Opacity" Value="0.8"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Cursor" Value="Hand" />
</Style>
</Button.Style>
<Border Background="Transparent" Height="32" Width="50">
<iconPacks:PackIconCodicons Kind="ChromeMinimize" Height="10" Width="11" Foreground="{DynamicResource TitleButtonForeground}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
</Button>
<Button Margin="1,1,1,0" x:Name="CloseButton" ToolTip="关闭">
<Button.Style>
<Style TargetType="{x:Type Button}">
<Setter Property="Width" Value="50"/>
<Setter Property="Height" Value="32"/>
<Setter Property="VerticalAlignment" Value="Top"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="CloseButtonElement" BorderThickness="0">
<ContentPresenter x:Name="CloseButtonContentPresenter" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger SourceName="CloseButtonElement" Property="IsMouseOver" Value="True">
<Setter TargetName="CloseButtonElement" Property="Background" Value="Red"/>
<Setter TargetName="CloseButtonElement" Property="Opacity" Value="0.8"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Cursor" Value="Hand" />
</Style>
</Button.Style>
<Border Background="Transparent" Height="32" Width="50">
<iconPacks:PackIconFeatherIcons Kind="X" Height="10" Width="10" Foreground="{DynamicResource TitleButtonForeground}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
</Button>
</StackPanel>
</Grid>
<Grid Grid.Row="1" Background="{DynamicResource WindowBackground}">
<Frame x:Name="MainFrame" NavigationUIVisibility="Hidden" BorderThickness="0">
</Frame>
</Grid>
</Grid>
</Border>
</Window>