ComponentOne Basic Library for UWP
Setting the Value
UWP Edition Basic Library > Input for UWP > Input for UWP Task-Based Help > C1MaskedTextBox Task-Based Help > Setting the Value

The C1MaskedTextBox.Value property determines the currently visible text. By default the C1MaskedTextBox control starts with its C1MaskedTextBox.Value not set but you can customize this.

At Design Time

To set the C1MaskedTextBox.Value property, complete the following steps:

  1. Click the C1MaskedTextBox control once to select it.
  2. Navigate to the Properties tab and enter a number, for example "123", in the text box next to the C1MaskedTextBox.Value property.

This will set the C1MaskedTextBox.Value property to the number you chose.

In XAML

To set the C1MaskedTextBox.Value property add Value="123" to the <Xaml:C1MaskedTextBox> tag so that it appears similar to the following:

Markup
Copy Code
<Xaml:C1MaskedTextBox Height="23" Width="120" Name="C1MaskedTextBox1" Value="123"></Xaml:C1MaskedTextBox>

In Code

To set the C1MaskedTextBox.Value property, add the following code to your project:

Visual Basic
Copy Code
C1MaskedTextBox1.Value = "123"

 

C#
Copy Code
c1MaskedTextBox1.Value = "123";

Run your project and observe:

Initially 123 (or the number you chose) will appear in the control.

See Also