Search code examples
c#visual-studiowinformssvgdevexpress

Add SVG images to resource file


I think this issue transcends Dev Express, which is why I haven't gone to the vendor's forum just yet (although I could be wrong). In the latest release of Dev Express Winforms (17.2), there is support for SVG images on the ribbon bar items. When you use the Dev Express picker and add them to project resources, it looks like this:

enter image description here

I have some SVG images of my own I'd like to add. Dragging and dropping them adds them as files. Doing an import through the designer adds them to the form resources, and I want them as project resources (we reuse icons across multiple forms).

Is there an easy way to add local SVG images to my Resources File and have them visible to all controls within the project, the way the Dev Express gallery images are?

If not, is there a hard way?


Solution

  • Consider using the SvgImageCollection component which specially designed to store vector images for DevExpress controls.
    You can invoke the SvgImageCollection's smart tag and click "Edit Collection" to invoke the Collection Editor dialog. Use the "Add" selector to choose where to import SVG images from: adding SVG images