baskren / Forms9Patch

Simplify image management and text formatting in your Xamarin.Forms apps
http://Forms9Patch.com
Other
128 stars 33 forks source link

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

Open zydjohnHotmail opened 3 years ago

zydjohnHotmail commented 3 years ago

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!