Control with Fill, EnsureViewboxSize, and EnsureViewboxPosition #241
Replies: 1 comment 2 replies
-
Currently, SvgViewbox supports the EnsureViewboxPosition, and EnsureViewboxSize properties. But there is no plan to add the Fill property for simplicity. Also, there are plans to extend SvgViewbox to provide interactive effects, so for now it is better to keep it simply until it is completed. The SvgIcon is the control meant for monochrome SVG and could be extended to support EnsureViewboxPosition, and EnsureViewboxSize properties - these are meant for icons and the simpler the better and it explains why this class is sealed. SvgIcon simply extends SvgBitmap, so we could provide a more extensive version of SvgIcon by providing a new extension of SvgBitmap. |
Beta Was this translation helpful? Give feedback.
-
SharpVectors version : 1.8.1
Framework: .NET Core 3.1
Graphical framework: WPF
Expected behavior
An svg that has a fill property while also ensuring that the size and position are not altered.
Actual behavior
What I have tried
As per the discussion #189, I used the
SvgViewboxEx
and in my xaml, I had the followingSetting the fill while also setting EnsureViewboxPosition and EnsureViewboxSize to true is not working as expected.
Conclusion
Is there a work around where the Fill, EnsureViewboxPosition, and EnsureViewboxSize properties can be set? Are there any plans to add these properties to either SvgIcon or SvgViewbox?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions