Skip to content

Commit ee56e6a

Browse files
committed
Merge branch 'master' into develop
2 parents e9f8377 + 08f2fbf commit ee56e6a

File tree

7 files changed

+277
-43
lines changed

7 files changed

+277
-43
lines changed

src/Net_40/HandyControl_Net_40/Themes/Styles/Window.xaml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,15 @@
7171
<ColumnDefinition Width="Auto" />
7272
<ColumnDefinition />
7373
</Grid.ColumnDefinitions>
74-
<Button Name="ButtonIcon" Visibility="{TemplateBinding Icon,Converter={StaticResource Object2VisibilityConverter}}" Command="{x:Static shell:SystemCommands.ShowSystemMenuCommand}" Background="Transparent" Margin="10,0,0,0" shell:WindowChrome.IsHitTestVisibleInChrome="True" Style="{StaticResource ButtonCustom}" VerticalAlignment="Center">
74+
<Button Name="ButtonIcon" Command="{x:Static shell:SystemCommands.ShowSystemMenuCommand}" Background="Transparent" Margin="10,0,0,0" shell:WindowChrome.IsHitTestVisibleInChrome="True" Style="{StaticResource ButtonCustom}" VerticalAlignment="Center">
75+
<Button.Visibility>
76+
<MultiBinding Converter="{StaticResource BooleanArr2VisibilityConverter}">
77+
<MultiBinding.Bindings>
78+
<Binding Path="ShowIcon" RelativeSource="{RelativeSource TemplatedParent}" />
79+
<Binding Path="Icon" RelativeSource="{RelativeSource TemplatedParent}" Converter="{StaticResource Object2BooleanConverter}" />
80+
</MultiBinding.Bindings>
81+
</MultiBinding>
82+
</Button.Visibility>
7583
<interactivity:Interaction.Triggers>
7684
<interactivity:EventTrigger EventName="MouseDoubleClick">
7785
<interactivity:InvokeCommandAction Command="{x:Static shell:SystemCommands.CloseWindowCommand}" />
@@ -194,7 +202,15 @@
194202
<ColumnDefinition Width="Auto" />
195203
<ColumnDefinition />
196204
</Grid.ColumnDefinitions>
197-
<Button Name="ButtonIcon" Visibility="{TemplateBinding Icon,Converter={StaticResource Object2VisibilityConverter}}" Command="{x:Static shell:SystemCommands.ShowSystemMenuCommand}" Background="Transparent" Margin="10,0,0,0" shell:WindowChrome.IsHitTestVisibleInChrome="True" Style="{StaticResource ButtonCustom}" VerticalAlignment="Center">
205+
<Button Name="ButtonIcon" Command="{x:Static shell:SystemCommands.ShowSystemMenuCommand}" Background="Transparent" Margin="10,0,0,0" shell:WindowChrome.IsHitTestVisibleInChrome="True" Style="{StaticResource ButtonCustom}" VerticalAlignment="Center">
206+
<Button.Visibility>
207+
<MultiBinding Converter="{StaticResource BooleanArr2VisibilityConverter}">
208+
<MultiBinding.Bindings>
209+
<Binding Path="ShowIcon" RelativeSource="{RelativeSource TemplatedParent}" />
210+
<Binding Path="Icon" RelativeSource="{RelativeSource TemplatedParent}" Converter="{StaticResource Object2BooleanConverter}" />
211+
</MultiBinding.Bindings>
212+
</MultiBinding>
213+
</Button.Visibility>
198214
<interactivity:Interaction.Triggers>
199215
<interactivity:EventTrigger EventName="MouseDoubleClick">
200216
<interactivity:InvokeCommandAction Command="{x:Static shell:SystemCommands.CloseWindowCommand}" />

src/Shared/HandyControlDemo_Shared/UserControl/Controls/TextBoxDemo.xaml

Lines changed: 100 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,42 +8,123 @@
88
DataContext="{Binding InputElementDemo, Source={StaticResource Locator}}">
99
<hc:TransitioningContentControl>
1010
<hc:ScrollViewer IsInertiaEnabled="True">
11-
<hc:UniformSpacingPanel Spacing="32" Margin="32" ChildWrapping="Wrap">
11+
<hc:UniformSpacingPanel Spacing="32"
12+
Margin="32"
13+
ChildWrapping="Wrap">
1214
<StackPanel>
13-
<hc:TextBox hc:InfoElement.ShowClearButton="True" Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}"/>
14-
<hc:TextBox Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" Margin="0,16,0,0" IsEnabled="False"/>
15+
<hc:TextBox hc:InfoElement.ShowClearButton="True"
16+
Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" />
17+
<hc:TextBox Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}"
18+
Margin="0,16,0,0"
19+
IsEnabled="False" />
1520

16-
<hc:TextBox hc:InfoElement.ShowClearButton="True" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}"/>
17-
<hc:TextBox hc:InfoElement.ShowClearButton="True" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,16,0,0" Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" IsEnabled="False"/>
18-
<hc:TextBox hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterEmail}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr2}}" hc:InfoElement.Necessary="True" Margin="0,16,0,0">
21+
<hc:TextBox hc:InfoElement.ShowClearButton="True"
22+
hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}"
23+
Margin="0,32,0,0"
24+
Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" />
25+
<hc:TextBox hc:InfoElement.ShowClearButton="True"
26+
hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}"
27+
Margin="0,16,0,0"
28+
Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}"
29+
IsEnabled="False" />
30+
<hc:TextBox hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterEmail}}"
31+
hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr2}}"
32+
hc:InfoElement.Necessary="True"
33+
Margin="0,16,0,0">
1934
<hc:TextBox.Text>
20-
<Binding Path="Email1" UpdateSourceTrigger="PropertyChanged">
35+
<Binding Path="Email1"
36+
UpdateSourceTrigger="PropertyChanged">
2137
<Binding.ValidationRules>
22-
<hc:RegexRule Type="Mail"/>
38+
<hc:NoBlankTextRule />
39+
<hc:RegexRule Type="Mail" />
40+
</Binding.ValidationRules>
41+
</Binding>
42+
</hc:TextBox.Text>
43+
</hc:TextBox>
44+
<hc:TextBox Width="380"
45+
hc:InfoElement.TitleWidth="140"
46+
hc:InfoElement.TitlePlacement="Left"
47+
hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}"
48+
Margin="0,32,0,0"
49+
Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" />
50+
<hc:TextBox hc:InfoElement.ShowClearButton="True"
51+
Width="380"
52+
hc:InfoElement.TitleWidth="140"
53+
hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}"
54+
hc:InfoElement.TitlePlacement="Left"
55+
hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}"
56+
hc:InfoElement.Necessary="True"
57+
Margin="0,16,0,0">
58+
<hc:TextBox.Text>
59+
<Binding Path="Text1"
60+
UpdateSourceTrigger="PropertyChanged">
61+
<Binding.ValidationRules>
62+
<hc:NoBlankTextRule />
2363
</Binding.ValidationRules>
2464
</Binding>
2565
</hc:TextBox.Text>
2666
</hc:TextBox>
27-
<hc:TextBox Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Margin="0,32,0,0" Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}"/>
28-
<hc:TextBox hc:InfoElement.ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" hc:InfoElement.Necessary="True" Margin="0,16,0,0"/>
2967
</StackPanel>
3068
<StackPanel>
31-
<hc:TextBox hc:InfoElement.ShowClearButton="True" Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" Style="{StaticResource TextBoxPlus.Small}"/>
32-
<hc:TextBox Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" Margin="0,16,0,0" IsEnabled="False" Style="{StaticResource TextBoxPlus.Small}"/>
69+
<hc:TextBox hc:InfoElement.ShowClearButton="True"
70+
Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}"
71+
Style="{StaticResource TextBoxPlus.Small}" />
72+
<hc:TextBox Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}"
73+
Margin="0,16,0,0"
74+
IsEnabled="False"
75+
Style="{StaticResource TextBoxPlus.Small}" />
3376

34-
<hc:TextBox hc:InfoElement.ShowClearButton="True" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,32,0,0" Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" Style="{StaticResource TextBoxPlus.Small}"/>
35-
<hc:TextBox hc:InfoElement.ShowClearButton="True" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}" Margin="0,16,0,0" Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" Style="{StaticResource TextBoxPlus.Small}" IsEnabled="False"/>
36-
<hc:TextBox hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterEmail}}" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr2}}" hc:InfoElement.Necessary="True" Margin="0,16,0,0" Style="{StaticResource TextBoxPlus.Small}">
77+
<hc:TextBox hc:InfoElement.ShowClearButton="True"
78+
hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}"
79+
Margin="0,32,0,0"
80+
Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}"
81+
Style="{StaticResource TextBoxPlus.Small}" />
82+
<hc:TextBox hc:InfoElement.ShowClearButton="True"
83+
hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr1}}"
84+
Margin="0,16,0,0"
85+
Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}"
86+
Style="{StaticResource TextBoxPlus.Small}"
87+
IsEnabled="False" />
88+
<hc:TextBox hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterEmail}}"
89+
hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr2}}"
90+
hc:InfoElement.Necessary="True"
91+
Margin="0,16,0,0"
92+
Style="{StaticResource TextBoxPlus.Small}">
93+
<hc:TextBox.Text>
94+
<Binding Path="Email2"
95+
UpdateSourceTrigger="PropertyChanged">
96+
<Binding.ValidationRules>
97+
<hc:NoBlankTextRule />
98+
<hc:RegexRule Type="Mail" />
99+
</Binding.ValidationRules>
100+
</Binding>
101+
</hc:TextBox.Text>
102+
</hc:TextBox>
103+
<hc:TextBox Width="380"
104+
hc:InfoElement.TitleWidth="140"
105+
hc:InfoElement.TitlePlacement="Left"
106+
hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}"
107+
Margin="0,32,0,0"
108+
Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}"
109+
Style="{StaticResource TextBoxPlus.Small}" />
110+
<hc:TextBox hc:InfoElement.ShowClearButton="True"
111+
Width="380"
112+
hc:InfoElement.TitleWidth="140"
113+
hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}"
114+
hc:InfoElement.TitlePlacement="Left"
115+
hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}"
116+
hc:InfoElement.Necessary="True"
117+
Margin="0,16,0,0"
118+
Style="{StaticResource TextBoxPlus.Small}">
37119
<hc:TextBox.Text>
38-
<Binding Path="Email2" UpdateSourceTrigger="PropertyChanged">
120+
<Binding Path="Text2"
121+
UpdateSourceTrigger="PropertyChanged">
39122
<Binding.ValidationRules>
40-
<hc:RegexRule Type="Mail"/>
123+
<hc:NoBlankTextRule />
41124
</Binding.ValidationRules>
42125
</Binding>
43126
</hc:TextBox.Text>
44127
</hc:TextBox>
45-
<hc:TextBox Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" Margin="0,32,0,0" Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" Style="{StaticResource TextBoxPlus.Small}"/>
46-
<hc:TextBox hc:InfoElement.ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterContent}}" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Title="{ex:Lang Key={x:Static langs:LangKeys.TitleDemoStr3}}" hc:InfoElement.Necessary="True" Margin="0,16,0,0" Style="{StaticResource TextBoxPlus.Small}"/>
47128
</StackPanel>
48129
</hc:UniformSpacingPanel>
49130
</hc:ScrollViewer>

0 commit comments

Comments
 (0)