-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml
80 lines (72 loc) · 4.21 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
<Window x:Class="ExampleApp.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:controls="clr-namespace:GradientTheme.Controls;assembly=GradientTheme"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d"
Title="MyApp" Height="450" Width="800"
MouseDown="MainWindow_OnMouseDown"
Style="{DynamicResource GradientWindow}">
<Border Style="{DynamicResource WindowBorder}">
<DockPanel>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!-- Toolbar grid -->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="24" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label Grid.Column="0" Grid.Row="1" Content="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=Title}" Style="{DynamicResource WindowTitle}" />
<Menu Grid.Column="1" Grid.Row="1" Style="{DynamicResource MenuStyle}">
<MenuItem Header="File" Style="{DynamicResource MenuItemStyle}">
<MenuItem Header="test" Style="{DynamicResource MenuItemStyle}"/>
</MenuItem>
<MenuItem Header="Tools" Style="{DynamicResource MenuItemStyle}"/>
<MenuItem Header="Another one" Style="{DynamicResource MenuItemStyle}"/>
<MenuItem Header="Help" Style="{DynamicResource MenuItemStyle}"/>
</Menu>
<Button Grid.Row="1" Grid.Column="2" Content="_" Click="MinimizeBtn_OnClick" Style="{DynamicResource ControlBarButton}" />
<Button Grid.Row="1" Grid.Column="3" Content="X" Click="CloseBtn_OnClick" Style="{DynamicResource ControlBarButton}" />
</Grid>
<!-- .Toolbar Grid -->
<!-- Title header -->
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="10*" />
<ColumnDefinition Width="70*" />
<ColumnDefinition Width="20*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<controls:TyperLabel Grid.Row="0" Grid.Column="1" Style="{DynamicResource TitleStyle}" >
<!-- Important that we supply at least one title, if not we will crash! -->
<controls:TyperLabel.Titles>
<x:Array Type="{x:Type sys:String}">
<sys:String>One Title</sys:String>
<sys:String>Another Title</sys:String>
<sys:String>Great Title</sys:String>
</x:Array>
</controls:TyperLabel.Titles>
</controls:TyperLabel>
<Label Grid.Row="1" Grid.Column="1" Content="A nice subdescription" Style="{DynamicResource SubheaderStyle}" />
</Grid>
</Grid>
</DockPanel>
</Border>
</Window>