Skip to content
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

[Enhancement] YOUR IDEA! Show SVG as image for WinForm Button using the repo #99

Open
zydjohnHotmail opened this issue Apr 7, 2021 · 0 comments

Comments

@zydjohnHotmail
Copy link

Summary

Please provide a brief summary of your proposal. Two to three sentences is best here.
I need to show SVG as image for WinForm Button in Windows 10, Visual Studio 2019 Version 16.9.3

API Changes

Include a list of all API changes, additions, subtractions as would be required by your proposal. These APIs should be considered placeholders, so the naming is not as important as getting the concepts correct. If possible you should include some "example" code of usage of your new API.

e.g.

In order to facilitate the new Shiny Button api, a bool is added to the Button class. This is done as a bool because it is simpler to data bind and other reasons...

var button = new Button ();
button.MakeShiny = true; // new API

The MakeShiny API works even if the button is already visible.

Intended Use Case

Provide a detailed example of where your proposal would be used and for what purpose.w
Hello:
I am working on a WinForm App for C# in Windows 10.
I can use raster format picture as the image for a button, like PNG, JPG, BMP.
However, those images are big, some times size are in MB. But for SVG, they are rather small, and for simple shapes, they are perfect.
But I can’t see any code example to use one SVG image for button image in a C# program.
Please show some code.
For example, I have one circle SVG file with a check:

"



"

Let’s say this file is called: “C:\Images\Circle1.svg”, and in my C# WinForm program, I created one Button called “button1”.
How I can use the Circle1.svg as the image for button1 in my C# program?
Please advise!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant