Beispiel #1
0
        protected override DrawingBrush CreateIconSourceBrush()
        {
            ITypeId type = (ITypeId)this.StyleType;

            if (type != null)
            {
                return(IconMapper.GetDrawingBrushForType(type, true, 24, 24));
            }
            return((DrawingBrush)null);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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));
        }