Condividi tramite


Change the color of text objects

To set the color of text in Blend for Visual Studio 2012, you set properties under Brushes in the Properties panel. Depending on the type of text object that you use, you can set two or more of the following color properties:

  • Foreground   The color of the text itself.

  • Background   The background color of the text box that contains the text.

  • BorderBrush   The color of the outline of the text box that contains the text.

To set the color of text

  1. Do one of the following:

    • To format all the text in a text box, select the text control object by using either the Selection tool JJ170947.2ff91340-477e-4efa-a0f7-af20851e4daa(it-it,VS.110).png or the Direct Selection tool JJ170947.6dd6571f-c116-451d-8dd2-1f88b8406362(it-it,VS.110).png.

    • To format only some of the text in a TextBlock or RichTextBox text control object, click either Selection JJ170947.2ff91340-477e-4efa-a0f7-af20851e4daa(it-it,VS.110).png or Direct Selection JJ170947.6dd6571f-c116-451d-8dd2-1f88b8406362(it-it,VS.110).png in the Tools panel, right-click the text box object, click Edit Text or press F2 to enter text-editing mode, and then drag your pointer to highlight the text that you want to format.

  2. In the Properties panel, under Brushes, select a property such as Foreground, and then use the brush options underneath to set the desired appearance. For more information about setting colors for a brush, see Apply a solid color or gradient brush to an object's fill or stroke.