ComponentOne Basic Library for UWP
Basic Library Overview / Input for UWP / Input for UWP Task-Based Help / C1MaskedTextBox Task-Based Help / Changing Font Type and Size
In This Topic
    Changing Font Type and Size
    In This Topic

    You can change the appearance of the text in the grid by using the text properties.

    At Design Time

    To change the font of the grid to Arial 10pt, complete the following:

    1. Click the C1MaskedTextBox control once to select it.
    2. Navigate to the Properties tab, and set FontFamily property to "Arial" (or a font of your choice).
    3. In the Properties window, set the FontSize property to 10.

    This will set the control's font size and style.

    In XAML

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

    Markup
    Copy Code
    <Xaml:C1MaskedTextBox Height="23" Name="C1MaskedTextBox1" Width="120" FontSize="10" FontFamily="Arial"></Xaml:C1MaskedTextBox>
    

    In Code

    For example, to change the font of the grid to Arial 10pt add the following code to your project:

    Visual Basic
    Copy Code
    C1MaskedTextBox1.FontSize = 10
    C1MaskedTextBox1.FontFamily = New System.Windows.Media.FontFamily("Arial")
    

     

    C#
    Copy Code
    c1MaskedTextBox1.FontSize = 10;
    c1MaskedTextBox1.FontFamily = new System.Windows.Media.FontFamily("Arial");
    

    Run your project and observe:

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

    See Also