-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExampleDialog.xaml
88 lines (86 loc) · 4.63 KB
/
ExampleDialog.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
<UserControl x:Class="SpecWpfMash.ExampleDialog"
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:system="clr-namespace:System;assembly=mscorlib"
xmlns:wpf="clr-namespace:MaterialDesignThemes.Wpf;assembly=MaterialDesignThemes.Wpf"
xmlns:Controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:local="clr-namespace:SpecWpfMash"
Background="white"
mc:Ignorable="d"
>
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" FontSize="20" Margin="0,0,0,0">Item 1</TextBlock>
<TextBlock Grid.Row="1" Grid.Column="0" FontSize="10" Margin="0,0,0,0">Desc</TextBlock>
<TextBox Grid.RowSpan="2" Grid.Column="1"
Controls:TextBoxHelper.Watermark="Number smaller than 10"
Text="{Binding IntegerGreater10Property, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged, NotifyOnValidationError=True}" />
</Grid>
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0">Count 1</Label>
<Controls:NumericUpDown x:Name="Min"
Grid.Row="1"
Grid.Column="0"
Controls:TextBoxHelper.ClearTextButton="True"
Maximum="{Binding ElementName=NUD_Max, Path=Value}"
Value="30" />
<Label Grid.Row="0" Grid.Column="1">Count 2</Label>
<Controls:NumericUpDown x:Name="Max"
Grid.Row="1"
Grid.Column="1"
Controls:TextBoxHelper.ClearTextButton="True"
Maximum="{Binding ElementName=NUD_Max, Path=Value}"
Value="30" />
</Grid>
<StackPanel Orientation="Horizontal" Grid.Row="2">
<Button FontSize="20" IsDefault="True" Style="{DynamicResource MaterialDesignFlatButton}"
Command="{x:Static wpf:DialogHost.CloseDialogCommand}" Margin="90,0,0,0">
<Button.CommandParameter>
<system:Boolean>True</system:Boolean>
</Button.CommandParameter>
SAVE
</Button>
<Button FontSize="20" IsCancel="True" Margin="0,0,0,0" Style="{DynamicResource MaterialDesignFlatButton}"
Command="{x:Static wpf:DialogHost.CloseDialogCommand}" HorizontalAlignment="Stretch">
<Button.CommandParameter>
<system:Boolean>False</system:Boolean>
</Button.CommandParameter>
CANCEL
</Button>
</StackPanel>
</Grid>
<!--TextBox wpf:HintAssist.Hint="ID" Style="{DynamicResource MaterialDesignFloatingHintTextBox}"
Margin="10,10,10,10"
FontSize="20" Grid.Row="1">
<TextBox.Text>
<Binding Path="Name" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<local:NotEmptyValidationRule ValidatesOnTargetUpdated="True" />
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</-->
</UserControl>