|
1 | 1 | <UserControl xmlns="https://github.com/avaloniaui" |
2 | 2 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
3 | | - xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
4 | | - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
5 | 3 | xmlns:hc="https://handyorg.github.io/handycontrol" |
6 | | - mc:Ignorable="d" |
7 | | - d:DesignWidth="800" |
8 | | - d:DesignHeight="450" |
9 | | - x:Class="HandyControlDemo.UserControl.TextBoxDemo"> |
| 4 | + xmlns:vm="clr-namespace:HandyControlDemo.ViewModel" |
| 5 | + x:Class="HandyControlDemo.UserControl.TextBoxDemo" |
| 6 | + DataContext="{Binding InputElementDemo, Source={x:Static vm:ViewModelLocator.Instance}}"> |
10 | 7 | <ScrollViewer> |
11 | 8 | <hc:UniformSpacingPanel Spacing="32" |
12 | 9 | Margin="32" |
|
32 | 29 | Text="This is the content" |
33 | 30 | IsEnabled="False" /> |
34 | 31 | <TextBox Watermark="please enter email" |
| 32 | + Text="{Binding Email1, UpdateSourceTrigger=PropertyChanged}" |
35 | 33 | hc:TitleElement.Title="This item must be filled in" |
36 | 34 | Theme="{StaticResource TextBoxExtend}" |
37 | 35 | hc:InfoElement.Necessary="True" |
|
44 | 42 | Margin="0,32,0,0" |
45 | 43 | Text="This is the content" /> |
46 | 44 | <TextBox Width="380" |
| 45 | + Text="{Binding Text1, UpdateSourceTrigger=PropertyChanged}" |
47 | 46 | hc:TitleElement.TitleWidth="120" |
48 | 47 | Watermark="Please enter content" |
49 | 48 | hc:TitleElement.TitlePlacement="Left" |
|
75 | 74 | Text="This is the content" |
76 | 75 | IsEnabled="False" /> |
77 | 76 | <TextBox Watermark="please enter email" |
| 77 | + Text="{Binding Email2, UpdateSourceTrigger=PropertyChanged}" |
78 | 78 | hc:TitleElement.Title="This item must be filled in" |
79 | 79 | Theme="{StaticResource TextBoxExtend.Small}" |
80 | 80 | hc:InfoElement.Necessary="True" |
|
87 | 87 | Margin="0,32,0,0" |
88 | 88 | Text="This is the content" /> |
89 | 89 | <TextBox Width="380" |
| 90 | + Text="{Binding Text2, UpdateSourceTrigger=PropertyChanged}" |
90 | 91 | hc:TitleElement.TitleWidth="120" |
91 | 92 | Watermark="Please enter content" |
92 | 93 | hc:TitleElement.TitlePlacement="Left" |
|
0 commit comments