protected override DrawingBrush CreateIconSourceBrush() { ITypeId type = (ITypeId)this.StyleType; if (type != null) { return(IconMapper.GetDrawingBrushForType(type, true, 24, 24)); } return((DrawingBrush)null); }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { ITypeId type = value as ITypeId; if (type != null) { return((object)IconMapper.GetDrawingBrushForType(type, false, 12, 12)); } return((object)null); }
private DrawingBrush CacheLargeIcon() { IUnreferencedType unreferencedType = this.type as IUnreferencedType; if (unreferencedType != null && unreferencedType.LargeIcon != null) { return(unreferencedType.LargeIcon); } if (this.exampleInfo != null && this.exampleInfo.LargeIcon != null) { DrawingBrush drawingBrushFromStream = IconMapper.CreateDrawingBrushFromStream((Stream) new MemoryStream(this.exampleInfo.LargeIcon), this.TypeName + this.exampleInfo.DisplayName + "24x24"); if (drawingBrushFromStream != null) { return(drawingBrushFromStream); } } return(IconMapper.GetDrawingBrushForType((ITypeId)this.type, true, 24, 24)); }