Share via


Format text (Blend for Visual Studio)

You can use the Font properties in Blend for Visual Studio 2012 to format the text in your application. If you use a TextBlock object, you can selectively apply formatting to particular words or characters in the object. With all other text object types, the formatting properties that you set will affect all text in the object.

Note

You cannot animate the properties under Text in the Properties panel except for the FontSize property. If you animate the FontSize property, you must set the property for the whole object (in other words, you cannot animate the FontSize property when you are in text-editing mode).

To set font properties

  1. Select the text object that contains the text that you want to format, by using either the Selection tool JJ155136.2ff91340-477e-4efa-a0f7-af20851e4daa(en-us,VS.110).png or the Direct Selection tool JJ155136.6dd6571f-c116-451d-8dd2-1f88b8406362(en-us,VS.110).png.

  2. To format only part of the text in a TextBlock object, right-click the object, click Edit Text, and then drag the pointer to select the text that you want to format. Otherwise, continue to the next step.

  3. In the Properties panel, under Text, click Font JJ155136.17db489b-22e6-4b99-9a19-fa1ed9d51e7e(en-us,VS.110).png, and then do one or more of the following:

    • Select a font from the FontFamily list to change the font for the text.

    • Select a size from the FontSize list to change the size of the text.

    • Click Bold JJ155136.0878fcd1-e719-4041-bbed-107579a715f2(en-us,VS.110).png to make the text bold.

    • Click Italic JJ155136.3c198921-4fa1-4240-8c53-f231415f71a8(en-us,VS.110).png to italicize the text.

The Underline feature is not supported. However, you can underline text by implementing the Underline class, for example:

<TextBlock Margin="116,348,389,320" Foreground="#FF3E0A0A" FontSize="64">
            <Run Text="The word "/>
                <Underline>
                  <Run Text="Windows Store"/>
                </Underline>
             <Run Text=" is underlined"/>
         </TextBlock> 

See Also

Tasks

Edit text (Blend for Visual Studio)

Format paragraphs (Blend for Visual Studio)