How do I embed SVG-Icons in Visual Studio?

Hi,

does anyone of you know how to embed SVG-Icons for a toolstrip in Visual Studio?

keithbartlett1Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
dquebeConnect With a Mentor Commented:
As in a toolstrip control in an WPF application, WinForms, ASP, ? For the most part when you add an image to the solution, you can get to the properties and change the "Build Action" to "Embedded Resource" versus the default "Resource".

http://msdn.microsoft.com/en-us/library/7k989cfy(VS.80).aspx

[From link]
Accessing Resources at Run-Time
To access a resource at run-time, simply reference it as you would any other class member. The following example shows how to retrieve a bitmap resource that you named Image01. Note that the Resources class is in a namespace called <projectName>.Properties, so you must either user the fully qualified name for each resource or else add the appropriate using directive in the source file from which you are accessing the Resources class.

System.Drawing.Bitmap bitmap1 = myProject.Properties.Resources.Image01;

Internally the get property uses the ResourceManager class to create a new instance of the object.
0
All Courses

From novice to tech pro — start learning today.