Hi,
I want to create a Resource Library of Drawing Brushes.
The
Idea is create a base drawing brush and change the color throw a
dependency propertie and use the new drawing brush in xaml. (i don´t
create a new drawing. the drawing is same but the colors changed)
I can do throw this:
DrawingBrush drwBrush = Mystyles[myDrawing] as DrawingBrush; drwBrush.SetValue(MyProperties.InternalSolidBrushProperty, Mystyles[keySolidBrush]);
|
I try this way but dosen´t work :(
x:Key="SymbolLock2" Stretch="Uniform" custom:MyProperties.InternalSolidBrush="{StaticResource SolidBrushOver}" Drawing="{Binding Source={StaticResource SymbolLock},Path=Drawing}"/>
|
Any Ideas? Dependency propertie InternalSolidBrushProperty dosen´t change the color of base drawing.!!
The code:
// DependencyProperty public static readonly DependencyProperty InternalSolidBrushProperty;
|
//DrawingBrush
custom:MyProperties.InternalSolidBrush="{StaticResource SolidBrushIconMenuSecondary}"> ......
|
Best Regards
Ricardo Silva
Replies
Know the answer? Post it — somebody with the same question will find it here.