Domanda

I have an existing Windows icon (.ico) file, that I would like to use in a WPF application. Are there any good tools for converting an .ico icon to an XAML Path Geometry?

È stato utile?

Soluzione

XAML Paths are a vector format and ICOs are bitmaps, so a simple conversion isn't possible.

You could try to open the ICO in a vector software like Inkscape, outline it with Paths then export it as XAML.

If the path is not a requirement, you can also use the .ico in the WPF application directly: simply set it as an Image's Source.

<Image Source="test.ico"/>
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top