简体   繁体   中英

Mahapps Metro Custom IconPack

I am working on a project that utilizes the Mahapps Metro Library , everything is going smoothly except for one issue. This application requires extensive use of Icons and I need to create some additional Icons.

I have searched high and low for some information on how to define Icons using the MahApps.Metro.IconPacks library. I have found all sorts of information on how to use them but nothing on how to define custom Icons.

I downloaded the MahApps.Metro.IconPacks library hoping to find an example of how to accomplish this and found that there are several "Auto Generated" files for the different Icon Packs. Obviously there is a tool hiding somewhere but I have no idea where/what it is.

Can someone point me in the right direction on how to go about defining a new Icon Pack? I assume that the Icons are drawn as SVG files and the paths are used as the Icons, is this correct? If so is there a particular convention that needs to be used when drawing the Icons? I have both Inkscape and Corel Draw and noticed that Inkscape has a .xaml export that exports a bunch of Canvas and Paths but not sure if this is the right starting point.

To define your custom IconPack, you can just create a resource file, in which you will place the xaml of every icon you are going to create. As you had the chance to see program like Inkscape, Expression Design, or Adobe Illustrator give you the xaml code of what you have create. You just need to copy that in the resource file, and give it a key, so when you will use this resource file in your app you can get the specific icon.

The icon is only the Path part of the code. The Canvas is just a container

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM