Skip to content

Commit aaa1a39

Browse files
artipoKeboo
andauthored
Add HintAssist.HelperTextFontSize (#2170) (#2192)
* Add HintAssist.HelperTextFontSize (#2170) * Added example in demo * Adding UI tests Co-authored-by: Federico <[email protected]> Co-authored-by: Kevin Bost <[email protected]>
1 parent 7bdbd39 commit aaa1a39

File tree

13 files changed

+258
-82
lines changed

13 files changed

+258
-82
lines changed

MainDemo.Wpf/Fields.xaml

Lines changed: 49 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,30 @@
1212
d:DesignHeight="300"
1313
d:DesignWidth="600"
1414
d:DataContext="{d:DesignInstance domain:FieldsViewModel, IsDesignTimeCreatable=False}">
15-
15+
1616
<UserControl.Resources>
1717
<Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource MaterialDesignTextBox}">
1818
<Setter Property="Margin" Value="0,8"/>
1919
<Setter Property="VerticalAlignment" Value="Center"/>
2020
</Style>
21-
21+
2222
<Style TargetType="{x:Type PasswordBox}" BasedOn="{StaticResource MaterialDesignPasswordBox}">
2323
<Setter Property="Margin" Value="0,8"/>
2424
</Style>
25-
25+
2626
<Style TargetType="{x:Type Viewbox}">
2727
<Setter Property="Width" Value="18"/>
2828
<Setter Property="Height" Value="18"/>
2929
<Setter Property="Margin" Value="0 0 8 0"/>
3030
<Setter Property="VerticalAlignment" Value="Center"/>
3131
</Style>
32-
32+
3333
<Style TargetType="{x:Type materialDesign:PackIcon}" BasedOn="{StaticResource {x:Type materialDesign:PackIcon}}">
3434
<Setter Property="VerticalAlignment" Value="Center"/>
3535
<Setter Property="Margin" Value="4 0 4 0"/>
3636
</Style>
3737
</UserControl.Resources>
38-
38+
3939
<StackPanel Margin="16 0 16 16">
4040
<Grid VerticalAlignment="Top">
4141
<Grid.ColumnDefinitions>
@@ -45,14 +45,14 @@
4545
<ColumnDefinition Width="155"/>
4646
<ColumnDefinition Width="*"/>
4747
</Grid.ColumnDefinitions>
48-
48+
4949
<Grid.RowDefinitions>
5050
<RowDefinition Height="Auto"/>
5151
<RowDefinition Height="Auto"/>
5252
<RowDefinition Height="Auto"/>
5353
<RowDefinition Height="Auto"/>
5454
<RowDefinition Height="Auto"/>
55-
<RowDefinition/>
55+
<RowDefinition Height="Auto"/>
5656
</Grid.RowDefinitions>
5757

5858
<TextBlock
@@ -61,13 +61,13 @@
6161
Grid.ColumnSpan="2"
6262
Style="{StaticResource MaterialDesignHeadline5TextBlock}"
6363
Text="Common Fields"/>
64-
64+
6565
<materialDesign:PackIcon
6666
Grid.Row="1"
6767
Grid.Column="0"
6868
Kind="Account"
6969
Foreground="{Binding ElementName=NameTextBox, Path=BorderBrush}"/>
70-
70+
7171
<smtx:XamlDisplay
7272
UniqueKey="fields_1"
7373
Grid.Column="1"
@@ -86,13 +86,13 @@
8686
</TextBox.Text>
8787
</TextBox>
8888
</smtx:XamlDisplay>
89-
89+
9090
<materialDesign:PackIcon
9191
Grid.Row="2"
9292
Grid.Column="0"
9393
Kind="Phone"
9494
Foreground="{Binding ElementName=PhoneTextBox, Path=BorderBrush}"/>
95-
95+
9696
<smtx:XamlDisplay
9797
UniqueKey="fields_4"
9898
Grid.Row="2"
@@ -101,23 +101,24 @@
101101
x:Name="PhoneTextBox"
102102
materialDesign:TransitionAssist.DisableTransitions="True"/>
103103
</smtx:XamlDisplay>
104-
104+
105105
<materialDesign:PackIcon
106106
Grid.Row="3"
107107
Grid.Column="0"
108108
Kind="Comment"
109109
Foreground="{Binding ElementName=CommentTextBox, Path=BorderBrush}"/>
110-
110+
111111
<smtx:XamlDisplay
112112
UniqueKey="fields_6"
113113
Grid.Row="3"
114114
Grid.Column="1">
115115
<TextBox
116116
x:Name="CommentTextBox"
117117
materialDesign:HintAssist.Hint="Comment"
118-
materialDesign:HintAssist.HelperText="Insert your comment here"/>
118+
materialDesign:HintAssist.HelperText="Bigger Helper Text"
119+
materialDesign:HintAssist.HelperTextFontSize="16"/>
119120
</smtx:XamlDisplay>
120-
121+
121122
<smtx:XamlDisplay
122123
UniqueKey="fields_8"
123124
Grid.Row="4"
@@ -134,7 +135,7 @@
134135
Kind="Key"
135136
Foreground="{Binding ElementName=PasswordBox, Path=BorderBrush}"
136137
HorizontalAlignment="Right"/>
137-
138+
138139
<smtx:XamlDisplay
139140
UniqueKey="fields_7"
140141
Grid.Row="1"
@@ -145,14 +146,14 @@
145146
materialDesign:TextFieldAssist.HasClearButton="True"
146147
materialDesign:HintAssist.HelperText="At least 8 characters"/>
147148
</smtx:XamlDisplay>
148-
149+
149150
<materialDesign:PackIcon
150151
Grid.Row="2"
151152
Grid.Column="2"
152153
Kind="Key"
153154
Margin="0 12 0 0"
154155
Foreground="{Binding ElementName=FloatingPasswordBox, Path=BorderBrush}"/>
155-
156+
156157
<smtx:XamlDisplay
157158
UniqueKey="fields_18"
158159
Grid.Row="2"
@@ -165,7 +166,7 @@
165166
materialDesign:TextFieldAssist.UnderlineBrush="Green"
166167
Style="{StaticResource MaterialDesignFloatingHintPasswordBox}"/>
167168
</smtx:XamlDisplay>
168-
169+
169170
<smtx:XamlDisplay
170171
UniqueKey="fields_19"
171172
Grid.Row="3"
@@ -179,7 +180,7 @@
179180
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
180181
FontSize="24"/>
181182
</smtx:XamlDisplay>
182-
183+
183184
<smtx:XamlDisplay
184185
UniqueKey="fields_13"
185186
Grid.Row="4"
@@ -189,7 +190,7 @@
189190
IsEnabled="False"
190191
MinWidth="72"/>
191192
</smtx:XamlDisplay>
192-
193+
193194
<smtx:XamlDisplay
194195
UniqueKey="fields_15"
195196
Grid.Row="5"
@@ -206,7 +207,7 @@
206207
Style="{StaticResource MaterialDesignHeadline5TextBlock}"
207208
Margin="32 0 0 0"
208209
Text="Multi-line"/>
209-
210+
210211
<smtx:XamlDisplay
211212
UniqueKey="fields_3"
212213
Grid.Row="1"
@@ -224,7 +225,7 @@
224225
Height="80"
225226
Text="Multiline. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. The quick brown fox jumps over the lazy dog. War and peace. Keep going. Go on. For how long? Not long. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."/>
226227
</smtx:XamlDisplay>
227-
228+
228229
<smtx:XamlDisplay
229230
UniqueKey="fields_32"
230231
Grid.Row="3"
@@ -236,12 +237,12 @@
236237
<RowDefinition Height="Auto"/>
237238
<RowDefinition/>
238239
</Grid.RowDefinitions>
239-
240+
240241
<CheckBox
241242
Content="Rich Text Box: IsReadOnly"
242243
IsChecked="True"
243244
x:Name="RichTextBoxIsReadOnlyCheckBox"/>
244-
245+
245246
<RichTextBox
246247
MinWidth="280" AcceptsReturn="True" IsDocumentEnabled="True"
247248
IsReadOnly="{Binding IsChecked, ElementName=RichTextBoxIsReadOnlyCheckBox}"
@@ -296,21 +297,21 @@
296297
<RowDefinition/>
297298
<RowDefinition/>
298299
</Grid.RowDefinitions>
299-
300+
300301
<Grid.ColumnDefinitions>
301302
<ColumnDefinition Width="Auto"/>
302303
<ColumnDefinition Width="Auto"/>
303304
<ColumnDefinition Width="Auto"/>
304305
<ColumnDefinition Width="Auto"/>
305306
</Grid.ColumnDefinitions>
306-
307+
307308
<Grid.Resources>
308309
<Style TargetType="{x:Type smtx:XamlDisplay}" BasedOn="{StaticResource {x:Type smtx:XamlDisplay}}">
309310
<Setter Property="Width" Value="200"/>
310311
<Setter Property="VerticalAlignment" Value="Top"/>
311312
<Setter Property="Margin" Value="0 0 16 0"/>
312313
</Style>
313-
314+
314315
<Style TargetType="CheckBox" BasedOn="{StaticResource {x:Type CheckBox}}">
315316
<Setter Property="Margin" Value="0 8"/>
316317
<Setter Property="IsChecked" Value="True"/>
@@ -321,14 +322,14 @@
321322
Grid.ColumnSpan="2"
322323
Style="{StaticResource MaterialDesignHeadline5TextBlock}"
323324
Text="Filled fields"/>
324-
325+
325326
<TextBlock
326327
Grid.Column="2"
327328
Grid.Row="0"
328329
Grid.ColumnSpan="2"
329330
Style="{StaticResource MaterialDesignHeadline5TextBlock}"
330331
Text="Outlined fields"/>
331-
332+
332333
<smtx:XamlDisplay
333334
Grid.Row="1"
334335
Grid.Column="0"
@@ -337,7 +338,7 @@
337338
<CheckBox
338339
x:Name="MaterialDesignFilledTextBoxEnabledComboBox"
339340
Content="Enabled"/>
340-
341+
341342
<TextBox
342343
Style="{StaticResource MaterialDesignFilledTextBox}"
343344
VerticalAlignment="Top"
@@ -348,7 +349,7 @@
348349
IsEnabled="{Binding Path=IsChecked, ElementName=MaterialDesignFilledTextBoxEnabledComboBox}"/>
349350
</StackPanel>
350351
</smtx:XamlDisplay>
351-
352+
352353
<smtx:XamlDisplay
353354
Grid.Row="1"
354355
Grid.Column="1"
@@ -357,15 +358,15 @@
357358
<CheckBox
358359
x:Name="MaterialDesignFilledPasswordFieldPasswordBoxEnabledComboBox"
359360
Content="Enabled"/>
360-
361+
361362
<PasswordBox
362363
Style="{StaticResource MaterialDesignFilledPasswordBox}"
363364
VerticalAlignment="Top"
364365
IsEnabled="{Binding Path=IsChecked, ElementName=MaterialDesignFilledPasswordFieldPasswordBoxEnabledComboBox}"
365366
materialDesign:HintAssist.Hint="Password"/>
366367
</StackPanel>
367368
</smtx:XamlDisplay>
368-
369+
369370
<smtx:XamlDisplay
370371
Grid.Row="1"
371372
Grid.Column="2"
@@ -375,7 +376,7 @@
375376
<CheckBox
376377
x:Name="MaterialDesignOutlinedTextBoxEnabledComboBox"
377378
Content="Enabled"/>
378-
379+
379380
<TextBox
380381
Style="{StaticResource MaterialDesignOutlinedTextBox}"
381382
VerticalAlignment="Top"
@@ -386,7 +387,7 @@
386387
materialDesign:HintAssist.Hint="This is a text area"
387388
IsEnabled="{Binding Path=IsChecked, ElementName=MaterialDesignOutlinedTextBoxEnabledComboBox}"/>
388389
</StackPanel>
389-
</smtx:XamlDisplay>
390+
</smtx:XamlDisplay>
390391
<smtx:XamlDisplay
391392
Grid.Row="1"
392393
Grid.Column="3"
@@ -395,7 +396,7 @@
395396
<CheckBox
396397
x:Name="MaterialDesignOutlinedPasswordFieldPasswordBoxEnabledComboBox"
397398
Content="Enabled"/>
398-
399+
399400
<PasswordBox
400401
Style="{StaticResource MaterialDesignOutlinedPasswordBox}"
401402
VerticalAlignment="Top"
@@ -414,15 +415,15 @@
414415
<ColumnDefinition Width="Auto"/>
415416
<ColumnDefinition Width="Auto"/>
416417
</Grid.ColumnDefinitions>
417-
418+
418419
<Grid.RowDefinitions>
419420
<RowDefinition/>
420421
<RowDefinition/>
421422
</Grid.RowDefinitions>
422423
<TextBlock
423424
Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
424425
Text="DataTemplate"/>
425-
426+
426427
<smtx:XamlDisplay
427428
UniqueKey="fields_20"
428429
Grid.Row="1"
@@ -436,13 +437,13 @@
436437
Text="{Binding Name}"
437438
Margin="0 0 0 0"
438439
VerticalAlignment="Bottom"/>
439-
440+
440441
<TextBox
441442
materialDesign:HintAssist.Hint="Content"
442443
Text="{Binding Content}"
443444
Margin="8 0 0 0"
444445
VerticalAlignment="Bottom"/>
445-
446+
446447
<TextBox
447448
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
448449
materialDesign:HintAssist.Hint="Name"
@@ -466,7 +467,7 @@
466467
Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
467468
Margin="32 0 0 0"
468469
Text="DataTemplateSelector"/>
469-
470+
470471
<smtx:XamlDisplay
471472
Grid.Row="1"
472473
Grid.Column="1"
@@ -484,20 +485,20 @@
484485
Text="{Binding Name}"
485486
Margin="0 0 0 0"
486487
VerticalAlignment="Bottom"/>
487-
488+
488489
<TextBox
489490
materialDesign:HintAssist.Hint="Content"
490491
Text="{Binding Content}"
491492
Margin="8 0 0 0"
492493
VerticalAlignment="Bottom"/>
493-
494+
494495
<TextBox
495496
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
496497
materialDesign:HintAssist.Hint="Name"
497498
Text="{Binding Name}"
498499
Margin="8 0 0 0"
499500
VerticalAlignment="Bottom"/>
500-
501+
501502
<TextBox
502503
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
503504
materialDesign:HintAssist.Hint="Content"
@@ -517,7 +518,7 @@
517518
Style="{StaticResource MaterialDesignSubtitle1TextBlock}"
518519
Margin="32 0 0 0"
519520
Text="Validation"/>
520-
521+
521522
<StackPanel
522523
Orientation="Horizontal"
523524
Grid.Row="1"
@@ -539,7 +540,7 @@
539540
</Binding>
540541
</TextBox.Text>
541542
</TextBox>
542-
</smtx:XamlDisplay>
543+
</smtx:XamlDisplay>
543544
<smtx:XamlDisplay
544545
UniqueKey="fields_validation_2"
545546
Width="120">
@@ -557,7 +558,7 @@
557558
</Binding>
558559
</TextBox.Text>
559560
</TextBox>
560-
</smtx:XamlDisplay>
561+
</smtx:XamlDisplay>
561562
<smtx:XamlDisplay
562563
UniqueKey="fields_validation_3"
563564
Width="120">

0 commit comments

Comments
 (0)