wpfvisual-studioxamlxaml-designer

Easily Editing XAML Color Resources in Visual Studio


From the XAML designer in Visual Studio it is possible to place your cursor into the Color attribute of a Brush element and easily access the color Editor.

<SolidColorBrush x:Key="MyBrush" Color="#FF4B4B4B" />

In the above case, if you place the cursor before in the # in the XAML, then you can access the color from the properties view shown in the image below, it is easily accessed under the "Appearance" section.

enter image description here

That works great, the issue is only when one would like to do the same with a Color resource that is defined like this instead.

<Color x:Key="MyBrushColor">#FF4D7BBF</Color>

In the above case, placing the cursor in front of the # apparently does NOT cause Visual Studio to display the color editor anywhere in the properties view.


Solution

  • Right after I posted this, I see how to do it, hope this helps someone else.