How do I convert a Color to a Brush in XAML?

I know I am really late to the party, but you don’t need a converter for this.

You could do

<Rectangle>
    <Rectangle.Fill>
        <SolidColorBrush Color="{Binding YourColorProperty}" />
    </Rectangle.Fill>
</Rectangle>

Leave a Comment