-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
/
ProgressDialog.xaml
42 lines (41 loc) · 2.66 KB
/
ProgressDialog.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
<Dialogs:BaseMetroDialog x:Class="MahApps.Metro.Controls.Dialogs.ProgressDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Controls="clr-namespace:MahApps.Metro.Controls"
xmlns:Dialogs="clr-namespace:MahApps.Metro.Controls.Dialogs"
Cursor="Wait">
<Dialogs:BaseMetroDialog.Content>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0"
Margin="0 5 0 0"
FontSize="{Binding DialogMessageFontSize, RelativeSource={RelativeSource AncestorType=Dialogs:ProgressDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType=Dialogs:ProgressDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
Text="{Binding Message, RelativeSource={RelativeSource AncestorType=Dialogs:ProgressDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
TextWrapping="Wrap" />
<StackPanel Grid.Row="1"
MinHeight="85"
HorizontalAlignment="Right"
Orientation="Horizontal">
<Button x:Name="PART_NegativeButton"
Margin="5 0 0 0"
Content="{Binding NegativeButtonText, RelativeSource={RelativeSource AncestorType=Dialogs:ProgressDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
Cursor="Arrow"
Style="{DynamicResource MahApps.Metro.Styles.Dialogs.AccentButton}"
Visibility="Hidden" />
</StackPanel>
</Grid>
</Dialogs:BaseMetroDialog.Content>
<Dialogs:BaseMetroDialog.DialogBottom>
<Controls:MetroProgressBar x:Name="PART_ProgressBar"
HorizontalAlignment="Stretch"
VerticalAlignment="Bottom"
Panel.ZIndex="5"
Foreground="{Binding ProgressBarForeground, RelativeSource={RelativeSource AncestorType=Dialogs:ProgressDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
Maximum="1.0"
Minimum="0.0" />
</Dialogs:BaseMetroDialog.DialogBottom>
</Dialogs:BaseMetroDialog>