maui: SVG extension Image does not work on ImageButton/Button
Description
When I created a ImageButton or Button, set Source/ImageSource property with a svg extension like below:
<Button ImageSource="button.svg"/>
The button would show nothing. But it works on MacOS
Steps to Reproduce
- Create a maui project
- Add ImageButton or Button
- Set Source or ImageSource with a svg extension image
Version with bug
Release Candidate 2
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
Windows 10
Did you find any workaround?
No response
Relevant log output
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 17 (6 by maintainers)
@AllenMiaoFil would you mind opening a new feature request for adding an ImageOpacity property to ImageButton?
https://github.com/dotnet/maui/issues/new?assignees=&labels=proposal%2Fopen%2Ct%2Fenhancement&template=feature-request.yml
I am not sure what you mean by this? When the svg is converted to a png, the values in the svg are used on a transparent image.
Also, the svg is just a build input and never reaches the final app.