|
2 | 2 | x:Class="MADE.Samples.Features.Samples.Pages.InputValidatorPage" |
3 | 3 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
4 | 4 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
5 | | - xmlns:controls="using:MADE.UI.Controls" |
6 | 5 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 6 | + xmlns:made="using:MADE.UI.Controls" |
7 | 7 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
8 | 8 | xmlns:pages="using:MADE.UI.Views.Navigation.Pages" |
| 9 | + xmlns:samples="using:MADE.Samples.Infrastructure.Controls" |
9 | 10 | xmlns:win="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
10 | 11 | Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" |
11 | 12 | mc:Ignorable="d"> |
|
28 | 29 | </win:CommandBar.Content> |
29 | 30 | </win:CommandBar> |
30 | 31 |
|
31 | | - <Grid Grid.Row="1" Padding="12"> |
| 32 | + <Grid Grid.Row="1" Padding="16"> |
32 | 33 | <Grid.RowDefinitions> |
33 | 34 | <RowDefinition Height="Auto" /> |
34 | 35 | <RowDefinition Height="Auto" /> |
35 | 36 | <RowDefinition Height="*" /> |
36 | 37 | </Grid.RowDefinitions> |
37 | 38 |
|
38 | 39 | <TextBlock |
39 | | - Margin="0,0,0,12" |
| 40 | + Margin="0,0,0,16" |
40 | 41 | Style="{StaticResource TitleTextBlockStyle}" |
41 | 42 | Text="InputValidator control" /> |
42 | 43 |
|
|
54 | 55 | <RowDefinition Height="*" /> |
55 | 56 | </Grid.RowDefinitions> |
56 | 57 |
|
57 | | - <controls:InputValidator |
58 | | - x:Name="TextBoxValidator" |
59 | | - Margin="0,0,0,12" |
60 | | - Input="{x:Bind TextBox.Text, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" |
61 | | - Validators="{x:Bind ViewModel.InputTextValidators}"> |
62 | | - <TextBox |
63 | | - x:Name="TextBox" |
64 | | - Header="TextBox with InputValidator" |
65 | | - Text="{x:Bind ViewModel.InputText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /> |
66 | | - </controls:InputValidator> |
| 58 | + <samples:SampleControl |
| 59 | + Margin="0,0,0,32" |
| 60 | + CodeSource="InputValidator/InputValidatorTextBoxCode.txt" |
| 61 | + SampleName="A TextBox wrapped with the InputValidator with a required value and max character length of 16" |
| 62 | + XamlSource="InputValidator/InputValidatorTextBoxXaml.txt"> |
| 63 | + <samples:SampleControl.Sample> |
| 64 | + <made:InputValidator |
| 65 | + x:Name="TextBoxValidator" |
| 66 | + Input="{x:Bind TextBox.Text, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" |
| 67 | + Validators="{x:Bind ViewModel.InputTextValidators}"> |
| 68 | + <TextBox |
| 69 | + x:Name="TextBox" |
| 70 | + Header="TextBox with InputValidator" |
| 71 | + Text="{x:Bind ViewModel.InputText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /> |
| 72 | + </made:InputValidator> |
| 73 | + </samples:SampleControl.Sample> |
| 74 | + </samples:SampleControl> |
67 | 75 |
|
68 | | - <controls:InputValidator |
69 | | - x:Name="DatePickerValidator" |
| 76 | + <samples:SampleControl |
70 | 77 | Grid.Row="1" |
71 | | - Margin="0,0,0,12" |
72 | | - Input="{Binding SelectedDate, Mode=TwoWay, ElementName=DatePicker, UpdateSourceTrigger=PropertyChanged}" |
73 | | - Validators="{x:Bind ViewModel.InputDateValidators}"> |
74 | | - <DatePicker |
75 | | - x:Name="DatePicker" |
76 | | - Header="DatePicker with InputValidator" |
77 | | - SelectedDate="{x:Bind ViewModel.InputDate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /> |
78 | | - </controls:InputValidator> |
| 78 | + CodeSource="InputValidator/InputValidatorDatePickerCode.txt" |
| 79 | + SampleName="A DatePicker wrapped with the InputValidator with a required value and date between the last 7 days and the next 7 days" |
| 80 | + XamlSource="InputValidator/InputValidatorDatePickerXaml.txt"> |
| 81 | + <samples:SampleControl.Sample> |
| 82 | + <made:InputValidator |
| 83 | + x:Name="DatePickerValidator" |
| 84 | + Input="{Binding SelectedDate, Mode=TwoWay, ElementName=DatePicker, UpdateSourceTrigger=PropertyChanged}" |
| 85 | + Validators="{x:Bind ViewModel.InputDateValidators}"> |
| 86 | + <DatePicker |
| 87 | + x:Name="DatePicker" |
| 88 | + Header="DatePicker with InputValidator" |
| 89 | + SelectedDate="{x:Bind ViewModel.InputDate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /> |
| 90 | + </made:InputValidator> |
| 91 | + </samples:SampleControl.Sample> |
| 92 | + </samples:SampleControl> |
79 | 93 | </Grid> |
80 | 94 | </ScrollViewer> |
81 | | - |
82 | 95 | </Grid> |
83 | | - |
84 | | - |
85 | 96 | </Grid> |
86 | 97 | </pages:MvvmPage> |
0 commit comments