Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

c#

icons

wpf

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.

like image 399
RandomEngy Avatar asked Apr 03 '10 21:04

RandomEngy


People also ask

Is WPF supported?

It's not dead or on life support. WPF is still one of the most used app frameworks in use on Windows (right behind WinForms).


2 Answers

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

like image 145
bohdan_trotsenko Avatar answered Sep 20 '22 07:09

bohdan_trotsenko


The vast majority of developers out there don't know that Visual Studio comes with an Image Library. So here goes two links that highlight it:

About using Microsoft Visual Studio 2008 Image Library.

like image 38
Leniel Maccaferri Avatar answered Sep 24 '22 07:09

Leniel Maccaferri