How to point one resource (a SolidColorBrush) at another

I agree with what Rachel said, but if you have to base it on an existing SolidColorBrush, you can do it with the following:

<SolidColorBrush x:Key="MyDataGridHeaderBrush" 
                 Color="{Binding Source={StaticResource HeaderBrushDefinedElsewhere}, Path=Color}"/>

Note this just works for the “Color” attribute, you’d have to do it separately for each attribute you needed.

Leave a Comment

tech