Reputation: 39
Not long ago, I started studying XAML and WPF. I can't find any information on how to draw SVG icons. If SVG can be inserted somehow, it would certainly make things much easier. I'm trying to draw this icon:
How difficult is it to draw this yourself? Is it worth the effort? Maybe it's enough to use IMG instead of SVG? I rely on your help. It's important that this icon should be linked to the button and change its color when inactive, and when hovering over the button, the image should take the same color as the button text. How should this be implemented? Should I create the icon outside the button and write the logic for the image, or place it inside the button and connect it there somehow? Also, please advise in which XAML file to insert the code? I was able to write this code from video tutorials, but it complains that I cannot use DrawingImage. I wrote it like this:
<DrawingImage x:Key="IconDrawingImage">
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V15 H12 V0 H0 Z">
<GeometryDrawing Brush="#FF725DFF" Geometry="F1 M12,15z M0,0z M6.66667,0.833344L0,8.83334 6,8.83334 5.33333,14.1667 12,6.16668 6,6.16668 6.66667,0.833344z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
Upvotes: -1
Views: 110