-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change svg fill and brush colour via binding #189
Comments
- SvgBitmap is added as a base class - SvgIcon is an extension of the SvgBitmap for monochrome SVG files - Resolves the issue #189
@stojy Sorry for the delay. NOTE: I cannot find any case to bind to the pen/stroke, even thought it is supported in |
@paulushub, don't mean to rush, but do we know when the nuget package that includes this feature will be released? |
@r-tmp Thanks for the interest. Unfortunately, there is still no feedback on this feature. If you find it useful, please test it and provide some feedbacks, that will make it easy to release. |
@paulushub Just tested it in a small project (.NET 6), not much to say except that seems to be working as expected 🙂. |
Thanks a lot, I spent like an hour searching for a solution to change the color of my complete black SVG. You need a reallife example? - Most SVGs are icons used in WPF views. Almost all icons are solid color, most black, unless multicolor icons, but that's a different story. However, this code works like a charm, and I hope for a integration in the next version. And maybe someday, multicolor svg icon support, that means, every closed element of a SVG curve can be filled with a different color. e.g. Array of elements with the option to fill each one independently. |
Thanks for the feedback.
Will need more information on this, please write more on this if you have the time. |
Sorry for the delay, release 1.8.1 is now available. |
A useful feature would be to allow the color defined in the svg to be overridden from a xaml binding (or indeed code behind).
Some use cases that come to mind..
AFAIK, it's been discussed elsewhere, e.g. #163, #88.
The following code snippet (heavily based on #88 (comment)) integrated into SvgViewbox would provide the functionality to override the 'fill' and 'stroke' brushes. It would need a bit of improvement though to remove the default color brushes mind you.
At any rate, the above code can be used verbatim for anyone wanting this feature without waiting for an equivalent in SharpVectors.
The text was updated successfully, but these errors were encountered: