-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathLoadingOverlay.xaml
More file actions
61 lines (61 loc) · 2.41 KB
/
LoadingOverlay.xaml
File metadata and controls
61 lines (61 loc) · 2.41 KB
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
<UserControl x:Class="TerrariaPixelArtHelper.LoadingOverlay"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:c="clr-namespace:CalcBinding;assembly=CalcBinding" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:fa5="http://schemas.fontawesome.com/icons/" xmlns:local="clr-namespace:TerrariaPixelArtHelper"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="480" d:DesignWidth="640"
mc:Ignorable="d">
<UserControl.DataContext>
<local:LoadingOverlayViewModel />
</UserControl.DataContext>
<Grid x:Name="overlay">
<Rectangle Opacity="0.5">
<Rectangle.Fill>
<SolidColorBrush Color="{StaticResource {x:Static SystemColors.ControlDarkDarkColorKey}}" />
</Rectangle.Fill>
</Rectangle>
<Grid x:Name="pleaseWaitGrid"
Width="{c:Binding ActualWidth / 3,
ElementName=overlay,
Mode=OneWay}"
Height="{c:Binding ActualHeight / 3,
ElementName=overlay,
Mode=OneWay}"
HorizontalAlignment="Center" VerticalAlignment="Center"
Panel.ZIndex="1"
Visibility="{c:Binding ShowPleaseWait,
Mode=OneWay}">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.Background>
<SolidColorBrush Color="{StaticResource {x:Static SystemColors.ControlColorKey}}" />
</Grid.Background>
<TextBlock x:Name="pleaseWaitTextBlock"
HorizontalAlignment="Center" VerticalAlignment="Center"
FontSize="{c:Binding 'Math.Min(ActualHeight / 4, ActualWidth / 8)',
ElementName=pleaseWaitGrid,
Mode=OneWay}"
Text="Please wait..." />
<TextBlock Grid.Row="1"
HorizontalAlignment="Center"
FontSize="{c:Binding 'FontSize / 2',
ElementName=pleaseWaitTextBlock,
Mode=OneWay}"
Text="{Binding WaitMessage, Mode=OneWay}"
Visibility="{c:Binding HasWaitMessage,
Mode=OneWay}" />
<fa5:SvgAwesome Grid.Row="2"
Width="{c:Binding ActualHeight / 3,
ElementName=pleaseWaitGrid,
Mode=OneWay}"
Height="{c:Binding ActualHeight / 3,
ElementName=pleaseWaitGrid,
Mode=OneWay}"
HorizontalAlignment="Center" VerticalAlignment="Center"
Icon="Solid_CircleNotch" Spin="True" />
</Grid>
</Grid>
</UserControl>