How do I use standard Windows warning/error icons in my WPF app?

RandomEngy picture RandomEngy · Apr 3, 2010 · Viewed 49.6k times · Source

I'm making a custom error dialog in my WPF app and I want to use a standard windows error icon. Can I get the OS-specific icon from WPF? If not, does anyone know where to get .pngs with transparency of them? Or know where in Windows to go extract them from?

So far my searches have turned up nothing.

Answer

bohdan_trotsenko picture bohdan_trotsenko · Apr 3, 2010

There is a SystemIcons class, but it need adjustment for WPF needs (i.e. converting Icon to ImageSource).