Skip to content

Commit 74aa3b0

Browse files
authored
Merge pull request #1312 from ArtisanDuCode/dev
TextBoxMasks in TextBoxMask
2 parents 894a3d7 + a680e0b commit 74aa3b0

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

docs/controls/TextBoxMask.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,27 @@ TextBoxMask has 2 type of characters
1919
2) Fixed: which the user can't change and it is any non variable character ex the - in the first example
2020

2121
Variable characters a represented to end user in form of placeholder so the user can know which characters he can change and which he can't, ex mask aaa-9999 will be presented to user as ___-____
22-
the default placeholder is _ but you can change it using controls:TextBoxMasks.PlaceHolder property (Check the second textbox in syntax section)
22+
the default placeholder is _ but you can change it using controls:TextBoxMask.PlaceHolder property (Check the second textbox in syntax section)
2323

24-
In case you want to add a custom variable character you can use property TextBoxMasks.CustomMask (Check the third textbox in syntax section), you can add a character that represents certain regex as c:[a-c] and once you use character c in the mask the mask will prevent any characters but from a to c inside the TextBox, also you specify multiple variable characters by adding comma "," after every character and it's representation. this feature is helpful if you want to allow certain language characters ex French or Arabic only TextBox.
24+
In case you want to add a custom variable character you can use property TextBoxMask.CustomMask (Check the third textbox in syntax section), you can add a character that represents certain regex as c:[a-c] and once you use character c in the mask the mask will prevent any characters but from a to c inside the TextBox, also you specify multiple variable characters by adding comma "," after every character and it's representation. this feature is helpful if you want to allow certain language characters ex French or Arabic only TextBox.
2525

2626
## Syntax
2727

2828
```xml
2929

30-
<TextBox controls:TextBoxMasks.Mask="9a9a-a9a*"
30+
<TextBox controls:TextBoxMask.Mask="9a9a-a9a*"
3131
Header="Text box with Mask 9a9a-a9a* (9 allows from 0 to 9, a allow from a to Z and * allows both a and 9)"
3232
/>
3333

3434
<TextBox
35-
controls:TextBoxMasks.Mask="+1999-9999"
36-
controls:TextBoxMasks.PlaceHolder=" "
35+
controls:TextBoxMask.Mask="+1999-9999"
36+
controls:TextBoxMask.PlaceHolder=" "
3737
Header="Text box with Mask +1999-9999 and placeHolder as space (placeholder represents the characters the user can change on runtime)"
3838
/>
3939

4040
<TextBox
41-
controls:TextBoxMasks.CustomMask="5:[1-5],c:[a-c]"
42-
controls:TextBoxMasks.Mask="a5c-5c*9"
41+
controls:TextBoxMask.CustomMask="5:[1-5],c:[a-c]"
42+
controls:TextBoxMask.Mask="a5c-5c*9"
4343
Header="Text box with CustomMask in case you want to define your own variable character like a,9 and * , mask: a5c-5c*9, 5: [1-5], c: [a-c]"
4444
/>
4545

@@ -89,21 +89,21 @@ The following sample demonstrates how to add TextBoxMask property.
8989
<RowDefinition />
9090
</Grid.RowDefinitions>
9191

92-
<TextBox controls:TextBoxMasks.Mask="9a9a-a9a*"
92+
<TextBox controls:TextBoxMask.Mask="9a9a-a9a*"
9393
Header="Text box with Mask 9a9a-a9a* (9 allows from 0 to 9, a allow from a to Z and * allows both a and 9)"
9494
HeaderTemplate="{StaticResource HeaderTemplate}"
9595
Style="{StaticResource MaskedTextBoxStyle}" />
9696

9797
<TextBox Grid.Row="1"
98-
controls:TextBoxMasks.Mask="+1999-9999"
99-
controls:TextBoxMasks.PlaceHolder=" "
98+
controls:TextBoxMask.Mask="+1999-9999"
99+
controls:TextBoxMask.PlaceHolder=" "
100100
Header="Text box with Mask +1999-9999 and placeHolder as space (placeholder represents the characters the user can change on runtime)"
101101
HeaderTemplate="{StaticResource HeaderTemplate}"
102102
Style="{StaticResource MaskedTextBoxStyle}" />
103103

104104
<TextBox Grid.Row="2"
105-
controls:TextBoxMasks.CustomMask="5:[1-5],c:[a-c]"
106-
controls:TextBoxMasks.Mask="a5c-5c*9"
105+
controls:TextBoxMask.CustomMask="5:[1-5],c:[a-c]"
106+
controls:TextBoxMask.Mask="a5c-5c*9"
107107
Header="Text box with CustomMask in case you want to define your own variable character like a,9 and * , mask: a5c-5c*9, 5: [1-5], c: [a-c]"
108108
HeaderTemplate="{StaticResource HeaderTemplate}"
109109
Style="{StaticResource MaskedTextBoxStyle}" />

0 commit comments

Comments
 (0)