How can I create a brush (DrawingBrush) for stripes as shown in the blog:
http://blog.pixelingene.com/2008/09/quick-tip-to-get-a-striped-background/
I can't use it because it uses scale transform, which means if the UI element is small, the stripes are pretty much not visible or too close together.
I can't use image brush because I need to bind the colors.
Just use MappingMode="Absolute":
<LinearGradientBrush MappingMode="Absolute" x:Key="HatchBrush" StartPoint="0,0" EndPoint="4,4" SpreadMethod="Repeat">
<GradientStop Offset="0" Color="LightCoral"/>
<GradientStop Offset="0.75" Color="LightCoral"/>
<GradientStop Offset="0.75" Color="Gray"/>
<GradientStop Offset="1" Color="Gray"/>
</LinearGradientBrush>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With