RichTextBox for UWP | ComponentOne
Working with RichTextBox for UWP / Menus and Commands / Creating Custom Command Bars / Font Functions
In This Topic
    Font Functions
    In This Topic

    The following code snippets demonstrate the code used for font functions:

    Font Family

    C#
    Copy Code
    rtb.Selection.FontFamily = new FontFamily("Arial");
    

    Font Size

    C#
    Copy Code
    rtb.Selection.TrimRuns();
    foreach (var run in rtb.Selection.Runs)
    {
        run.FontSize = size;
    }