SystemIcons.Shield Icon

18 12 2007

Daniel Moth has blogged about the new SystemIcons.Shield icon added to the set of System.Drawing.SystemIcons collection. This new Shield icon can be used to display whenever an admin task is required to be carried out. You would be familiar with this icon if you are using Vista. For example – If you open the Indexing Options dialog box in Vista,


You can see the Advanced button has the Shield icon in it which indicates that it would be an admin task.

You can refer to Daniel’s post on how to add the Shield icon to Windows Forms application

If you want to add to an Image control in a WPF application, all you have to do is set the Image‘s Source property to a BitmapSource. You can create the BitmapSource object from an Icon as shown below 🙂

BitmapSource source = System.Windows.Interop.Imaging.CreateBitmapSourceFromHIcon
     Int32Rect.Empty, System.Windows.Media.Imaging.BitmapSizeOptions.FromEmptyOptions());

this.MyImage.Source = source;

And you can see something similar,





Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: