-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLoadingControl.xaml
More file actions
71 lines (71 loc) · 2.24 KB
/
LoadingControl.xaml
File metadata and controls
71 lines (71 loc) · 2.24 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
62
63
64
65
66
67
68
69
70
71
<UserControl x:Class="YourNamespace.LoadingControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:YourNamespace"
mc:Ignorable="d"
BorderBrush="Transparent"
Background="Transparent"
BorderThickness="0">
<Grid Margin="12"
DataContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:LoadingControl}}}">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="1000*"
MaxHeight="300" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.Resources>
<Style TargetType="Rectangle">
<Setter Property="Margin"
Value="4" />
<Setter Property="VerticalAlignment"
Value="Stretch" />
<Setter Property="RenderTransform">
<Setter.Value>
<ScaleTransform ScaleY="0.15" />
</Setter.Value>
</Setter>
<Setter Property="RenderTransformOrigin"
Value="0.5,0.5" />
<Setter Property="Fill"
Value="Transparent" />
</Style>
</Grid.Resources>
<Border BorderThickness="1.5"
HorizontalAlignment="Center"
Margin="0 10 0 0"
Grid.Row="2"
CornerRadius="15">
<Border.BorderBrush>
<LinearGradientBrush StartPoint="0.5,0"
EndPoint="0.5,1">
<GradientStop Offset="0"
Color="{Binding Color1}" />
<GradientStop Offset="1"
Color="{Binding Color2}" />
</LinearGradientBrush>
</Border.BorderBrush>
<TextBlock x:Name="message"
Padding="8 4"
TextWrapping="Wrap"
Text="{Binding Message}"
TextAlignment="Center"
FontFamily="Calibri"
Foreground="Black"
FontSize="22"
FontWeight="Bold"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Border>
<UniformGrid Grid.Row="1"
Columns="{Binding Rows}"
Rows="{Binding Columns}"
MaxHeight="300"
x:Name="rectangles"
Width="{Binding ActualHeight, Mode=OneWay, RelativeSource={RelativeSource Self}}">
</UniformGrid>
</Grid>
</UserControl>