Solved

How do I embed SVG-Icons in Visual Studio?

Posted on 2010-11-23
1
1,444 Views
Last Modified: 2013-11-27
Hi,

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

0
Comment
Question by:keithbartlett1
1 Comment
 
LVL 4

Accepted Solution

by:
dquebe earned 500 total points
Comment Utility
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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now