How do you set Foreground="yellow" using the Properties of a TextBlock?


  • Of course I can just type in the XAML, but I am trying to learn how to use the XAML designer instead and enter the properties.

    I see under Brush, icons for

    NoBrush, Solid Color Brush  ; And a RGB color selector

    There is a RGB color selector under Solid Color Brush, but I don't see a way to just choose the symbolic "Yellow".

    Sunday, May 20, 2012 2:31 PM


  • You can type a color name in the textbox on the lower right of the color picker. If it's a known color the color picker will convert it to the hex value. When saved into the actual Xaml, known colors will be converted back from the hex value to the symbolic name. The following generated Foreground="Yellow" in my Xaml:


    • Marked as answer by Andrew7Webb Sunday, May 20, 2012 4:56 PM
    Sunday, May 20, 2012 2:44 PM