-
Notifications
You must be signed in to change notification settings - Fork 2
/
ModernWindow.xaml
69 lines (59 loc) · 4.1 KB
/
ModernWindow.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
<Window x:Class="AdvancedWindowsAppearence.ModernWindow"
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:AdvancedWindowsAppearence"
xmlns:converters="clr-namespace:AdvancedWindowsAppearence.Converters"
xmlns:controls="clr-namespace:AdvancedWindowsAppearence.Controls" x:Name="window"
mc:Ignorable="d"
Title="Advanced Windows Appearance"
Activated="window_Activated" Deactivated="window_Deactivated"
AllowsTransparency="False" WindowStyle="None"
MinWidth="520" MinHeight="150"
Background="#33000000" Loaded="Window_Loaded" WindowStartupLocation="CenterOwner">
<WindowChrome.WindowChrome>
<WindowChrome GlassFrameThickness="10" CornerRadius="0" CaptionHeight="0" ResizeBorderThickness="7" UseAeroCaptionButtons="False">
</WindowChrome>
</WindowChrome.WindowChrome>
<Window.Resources>
<ResourceDictionary>
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
<converters:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
<converters:BrushToColorConverter x:Key="brushToColor" />
<converters:DrawingColorToMediaColorConverter x:Key="DrawingColorToMediaColorConverter"/>
<converters:FontToFontFamilyConverter x:Key="FontToFontFamily"/>
<converters:BooleanToFontWeightConverter x:Key="BooleanToFontWeight"/>
<converters:BooleanToFontStyleConverter x:Key="BooleanToFontStyle"/>
<converters:MultiMarginConverter x:Key="multiMargin"/>
</ResourceDictionary>
</Window.Resources>
<Grid x:Name="masterGrid" Background="{DynamicResource BackgroundColorTabItems}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Border x:Name="windowBorder" BorderThickness="1" Panel.ZIndex="10" Grid.RowSpan="2">
</Border>
<!--Window Titlebar-->
<Grid x:Name="titlebarGrid" Panel.ZIndex="100" VerticalAlignment="Top" Margin="1" MouseDown="Grid_MouseDown" Background="#02FFFFFF">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Label x:Name="label" Padding="15 4 0 4" Grid.Column="1" MinHeight="30" Content="Advanced Windows Appearance" FontFamily="{Binding FontSettings[0].Font, Converter={StaticResource FontToFontFamily}, Mode=OneWay}"
FontSize="{DynamicResource {x:Static SystemFonts.CaptionFontSizeKey}}"
Foreground="{DynamicResource ForegroundColor}"
FontStyle="{Binding FontSettings[0].IsItalic, Converter={StaticResource BooleanToFontStyle}, Mode=OneWay}" VerticalContentAlignment="Center"/>
<!--Title Buttons-->
<StackPanel Panel.ZIndex="100" Grid.Column="2" Orientation="Horizontal">
<Button x:Name="minimizeButton" Style="{StaticResource CaptionButtonWin10}" Foreground="{DynamicResource ForegroundColor}" Grid.Column="2" Content="" IsTabStop="False" Click="minimizeButton_Click"/>
<Button x:Name="maximizeButton" Style="{StaticResource CaptionButtonWin10}" Foreground="{DynamicResource ForegroundColor}" Grid.Column="3" Content="" IsTabStop="False" Click="maximizeButton_Click"/>
<Button x:Name="closeButton" Style="{StaticResource CaptionButtonCloseWin10}" Foreground="{DynamicResource ForegroundColor}" Grid.Column="4" Content="" IsTabStop="False" Click="closeButton_Click_1"/>
</StackPanel>
</Grid>
<Frame x:Name="contentFrame" NavigationUIVisibility="Hidden" Margin="-1 1 1 1" Grid.Row="1"/>
</Grid>
</Window>