-
-
Notifications
You must be signed in to change notification settings - Fork 962
Expand file tree
/
Copy pathMessageBoxPage.xaml
More file actions
68 lines (62 loc) · 4.19 KB
/
MessageBoxPage.xaml
File metadata and controls
68 lines (62 loc) · 4.19 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
<Page
x:Class="Wpf.Ui.Gallery.Views.Pages.DialogsAndFlyouts.MessageBoxPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:Wpf.Ui.Gallery.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Wpf.Ui.Gallery.Views.Pages.DialogsAndFlyouts"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:system="clr-namespace:System;assembly=System.Runtime"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
Title="MessageBoxPage"
controls:PageControlDocumentation.DocumentationType="{x:Type ui:MessageBox}"
d:DataContext="{d:DesignInstance local:MessageBoxPage,
IsDesignTimeCreatable=False}"
d:DesignHeight="450"
d:DesignWidth="800"
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}"
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
mc:Ignorable="d">
<StackPanel Margin="0,0,0,24">
<controls:ControlExample
Margin="0"
HeaderText="Standard MessageBox."
XamlCode="<MessageBox />">
<Button
Command="{Binding ViewModel.OpenStandardMessageBoxCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:MessageBoxPage}, Mode=OneWay}"
CommandParameter="{Binding RelativeSource={RelativeSource Self}, Mode=OneWay}"
Content="Open standard MessageBox" />
</controls:ControlExample>
<controls:ControlExample Margin="0,36,0,0" HeaderText="WPF UI MessageBox.">
<Button
Command="{Binding ViewModel.OpenCustomMessageBoxCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:MessageBoxPage}, Mode=OneWay}"
CommandParameter="{Binding RelativeSource={RelativeSource Self}, Mode=OneWay}"
Content="Open custom MessageBox" />
</controls:ControlExample>
<controls:ControlExample Margin="0,36,0,0" HeaderText="Three Button MessageBox. (Default Focus: Secondary Button)">
<Button
Command="{Binding ViewModel.OpenThreeButtonMessageBoxCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:MessageBoxPage}, Mode=OneWay}"
CommandParameter="{Binding RelativeSource={RelativeSource Self}, Mode=OneWay}"
Content="Open three button MessageBox" />
</controls:ControlExample>
<controls:ControlExample Margin="0,36,0,0" HeaderText="MessageBox with Focusable Content. (Default Focus: Primary Button)">
<Button
Command="{Binding ViewModel.OpenMessageBoxWithFocusableContentCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:MessageBoxPage}, Mode=OneWay}"
CommandParameter="{Binding RelativeSource={RelativeSource Self}, Mode=OneWay}"
Content="Open MessageBox with TextBox" />
</controls:ControlExample>
<controls:ControlExample Margin="0,36,0,0" HeaderText="MessageBox with Icons. (Default Focus: Secondary Button)">
<Button
Command="{Binding ViewModel.OpenMessageBoxWithIconsCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:MessageBoxPage}, Mode=OneWay}"
CommandParameter="{Binding RelativeSource={RelativeSource Self}, Mode=OneWay}"
Content="Open MessageBox with icon" />
</controls:ControlExample>
<controls:ControlExample Margin="0,36,0,0" HeaderText="MessageBox with Auto Focus. (Default Focus: Primary Button - automatically set when no button or non-button control has focus)">
<Button
Command="{Binding ViewModel.OpenMessageBoxWithAutoFocusCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:MessageBoxPage}, Mode=OneWay}"
CommandParameter="{Binding RelativeSource={RelativeSource Self}, Mode=OneWay}"
Content="Open MessageBox with auto focus" />
</controls:ControlExample>
</StackPanel>
</Page>