WPF and Silverlight Edition Basic Library / Masked Text Box / Formatting / Font Size and Type
Font Size and Type

You can change the appearance of the text in the grid by using the text properties in the C1MaskedTextBox Properties window, in XAML, or in code.

To change the font of the control to Arial 10pt in XAML add FontFamily="Arial" FontSize="10" to the <c1:C1MaskedTextBox> tag so that it appears similar to the following:

XAML
Copy Code
<c1:C1MaskedTextBox Height="23" HorizontalAlignment="Left" Margin="10,10,0,0" Name="C1MaskedTextBox1" VerticalAlignment="Top" Width="120" FontSize="10" FontFamily="Arial"></c1:C1MaskedTextBox>

 

Run your project and observe:

The control's content will appear in Arial 10pt font: