This is how I used a System icon in XAML:
xmlns:draw="clr-namespace:System.Drawing;assembly=System.Drawing"
...
<Image Source="{Binding Source={x:Static draw:SystemIcons.Warning},
Converter={StaticResource IconToImageSourceConverter},
Mode=OneWay}" />
I used this converter to turn an Icon to ImageSource:
public class IconToImageSourceConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var icon = value as Icon;
if (icon == null)
{
Trace.TraceWarning("Attempted to convert {0} instead of Icon object in IconToImageSourceConverter", value);
return null;
}
ImageSource imageSource = Imaging.CreateBitmapSourceFromHIcon(
icon.Handle,
Int32Rect.Empty,
BitmapSizeOptions.FromEmptyOptions());
return imageSource;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}