Frage

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?

War es hilfreich?

Lösung

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"/>
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top