0% found this document useful (0 votes)
123 views

Extended Toolkit

To add a masked text box control to a WPF project using the Extended WPF Toolkit: 1. Install the Extended WPF Toolkit NuGet package. 2. Add a using statement for the toolkit namespace. 3. Add the toolkit XML namespace and then add a MaskedTextBox control setting the Mask property to define the mask format.

Uploaded by

Jaskaran Singh
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
123 views

Extended Toolkit

To add a masked text box control to a WPF project using the Extended WPF Toolkit: 1. Install the Extended WPF Toolkit NuGet package. 2. Add a using statement for the toolkit namespace. 3. Add the toolkit XML namespace and then add a MaskedTextBox control setting the Mask property to define the mask format.

Uploaded by

Jaskaran Singh
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

1. Go to Tool>NuGet Package Manager> Package Manager Console.

(In Visual
Studio).
2. Run this Command (without double-quotes) "Install-Package Extended.Wpf.Toolkit"
. (Extended Wpf Toolkit will be installed and added to your project).
3. Add a using statement ("using Xceed.Wpf.Toolkit;") to the top of .cs file.
4. Add a new xmlns (for example
xmlns:wpfx="http://schemas.xceed.com/wpf/xaml/toolkit" to the top of XAML files .

and the XAML for Masked Text box is.


<wpfx:MaskedTextBox Mask="000-000-0000" x:Name=" Width="150" Height="24" >

Mask
Element

Description

Digit, required. This element will accept any single digit between 0 and 9.

Digit or space, optional.

&

Digit or space, optional. If this position is blank in the mask, it will be rendered
as a space in the Text property. Plus (+) and minus (-) signs are allowed.

Letter, required. Restricts input to the ASCII letters a-z and A-Z. This mask
element is equivalent to [a-z A-Z] in regular expressions.

Letter, optional. Restricts input to the ASCII letters a-z and A-Z. This mask
element is equivalent to [a-z A-Z]? in regular expressions.

Character, required. If the Ascii Only property is set to true, this element
behaves like the "L" element.

Character, optional. Any non-control character. If the Ascii Only property is set to
true, this element behaves like the "?" element.

Alphanumeric, optional. If the Ascii Only property is set to true, the only
characters it will accept are the ASCII letters a-z and A-Z.

Alphanumeric, optional. If the Ascii Only property is set to true, the only
characters it will accept are the ASCII letters a-z and A-Z.

Decimal placeholder. The actual display character used will be the decimal
.

symbol appropriate to the format provider, as determined by the control's


Format Provider property.

Thousands placeholder. The actual display character used will be the thousands
,

placeholder appropriate to the format provider, as determined by thecontrol's


Format Provider property.

Time separator. The actual display character used will be the time symbol
:

appropriate to the format provider, as determined by the control's Format


Provider property.

Date separator. The actual display character used will be the date symbol
/

appropriate to the format provider, as determined by the control's Format


Provider property.

Currency symbol. The actual character displayed will be the currency symbol
$

appropriate to the format provider, as determined by the control's Format


Provider property.

<

Shift down. Converts all characters that follow to lowercase

>

Shift up. Converts all characters that follow to uppercase.

Disable a previous shift up or shift down.

Escape. Escapes a mask character, turning it into a literal. "\\" is the escape
sequence for a backslash.

You might also like