Ejemplo n.º 1
0
        protected override DrawingBrush CreateIconSourceBrush()
        {
            ITypeId type = (ITypeId)this.StyleType;

            if (type != null)
            {
                return(IconMapper.GetDrawingBrushForType(type, true, 24, 24));
            }
            return((DrawingBrush)null);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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));
        }