-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml
124 lines (121 loc) · 7 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<controls:MetroWindow x:Class="Memenim.Framework.MainWindow"
d:DataContext="{d:DesignInstance local: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:Memenim.Framework"
xmlns:flyouts="clr-namespace:Memenim.Framework.Flyouts"
xmlns:markupLocalization="clr-namespace:RIS.Localization.UI.WPF.Markup;assembly=RIS.Localization.UI.WPF"
xmlns:indicatorsLoading="clr-namespace:RIS.Graphics.Controls;assembly=RIS.Graphics"
xmlns:controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
xmlns:dialogs="clr-namespace:MahApps.Metro.Controls.Dialogs;assembly=MahApps.Metro"
mc:Ignorable="d"
MinWidth="900" MinHeight="550"
Width="900" Height="550"
WindowTitleBrush="{DynamicResource Window.Main.TitleBackground}"
NonActiveWindowTitleBrush="{DynamicResource Window.Main.NonActiveTitleBackground}"
GlowBrush="{DynamicResource MahApps.Brushes.Accent}"
Title="MEMENIM Desktop"
TitleForeground="Transparent"
ShowTitleBar="True"
ShowIconOnTitleBar="False"
dialogs:DialogParticipation.Register="{Binding}"
Closed="MainWindow_Closed">
<controls:MetroWindow.LeftWindowCommands>
<controls:WindowCommands>
<controls:WindowCommandsItem>
<StackPanel Orientation="Horizontal">
<TextBlock Foreground="{DynamicResource MahApps.Brushes.IdealForeground}"
Text="MEMENIM DESKTOP"
FontSize="16"
FontWeight="Thin"
TextAlignment="Center"
HorizontalAlignment="Left" VerticalAlignment="Center"
Margin="5 0 10 0"/>
</StackPanel>
</controls:WindowCommandsItem>
<controls:WindowCommandsItem IsSeparatorVisible="False">
<StackPanel Orientation="Horizontal">
<Button x:Name="OpenLinkButton"
HorizontalAlignment="Center" VerticalAlignment="Center"
Click="OpenLinkButton_Click">
<iconPacks:PackIconModern Width="15" Height="15"
Kind="Link"
Foreground="{DynamicResource MahApps.Brushes.IdealForeground}"
HorizontalAlignment="Center" VerticalAlignment="Center"
Margin="3 0 3 0"/>
</Button>
</StackPanel>
</controls:WindowCommandsItem>
</controls:WindowCommands>
</controls:MetroWindow.LeftWindowCommands>
<controls:MetroWindow.Flyouts>
<controls:FlyoutsControl>
<!--<flyouts:SettingsFlyout x:Name="SettingsFlyout"
MinWidth="300" MaxWidth="300"
Position="Right"
Theme="Adapt"/>-->
</controls:FlyoutsControl>
</controls:MetroWindow.Flyouts>
<Grid x:Name="RootLayout">
<Grid Grid.Row="0" Grid.Column="0"
x:Name="LoadingGrid"
Background="{DynamicResource MahApps.Brushes.Window.Background}"
ZIndex="2147483646"
Visibility="Collapsed">
<Rectangle Fill="{DynamicResource Window.Main.Background}"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
<Image x:Name="LoadingBackgroundImage"
Stretch="Uniform"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
<Image x:Name="LoadingForegroundImage"
Width="256" Height="256"
Stretch="Uniform"
HorizontalAlignment="Center" VerticalAlignment="Center"/>
<indicatorsLoading:LoadingIndicator x:Name="LoadingIndicator"
Mode="Arcs"
SpeedRatio="2"
IsActive="False"
Visibility="Visible"
Margin="30"/>
</Grid>
<Grid Grid.Row="0" Grid.Column="0"
x:Name="ConnectionFailedGrid"
Background="{DynamicResource MahApps.Brushes.Window.Background}"
ZIndex="2147483647"
Visibility="Collapsed">
<Rectangle Fill="{DynamicResource Window.Main.Background}"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
<Image x:Name="ConnectionFailedBackgroundImage"
Stretch="Uniform"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
<Image x:Name="ConnectionFailedForegroundImage"
Width="256" Height="256"
Stretch="Uniform"
HorizontalAlignment="Center" VerticalAlignment="Center"/>
<StackPanel Orientation="Vertical"
VerticalAlignment="Top">
<controls:MetroProgressBar MinHeight="4"
Height="4"
Style="{DynamicResource MahApps.Styles.ProgressBar}"
IsIndeterminate="True"
BorderThickness="0"/>
<TextBlock MinHeight="20"
Foreground="{DynamicResource MahApps.Brushes.IdealForeground}"
Text="{markupLocalization:LocalizedString AttemptingRestoreConnection}"
FontSize="15"
TextWrapping="Wrap"
TextAlignment="Center"
Margin="10 5 10 5"/>
</StackPanel>
<indicatorsLoading:LoadingIndicator x:Name="ConnectionFailedIndicator"
Mode="Arcs"
SpeedRatio="2"
IsActive="False"
Visibility="Visible"
Margin="30"/>
</Grid>
</Grid>
</controls:MetroWindow>