BitmapEditor 类

定义

重要

此 API 不符合 CLS。

提供用于在属性浏览器中选择位图文件的用户界面。

public ref class BitmapEditor : System::Drawing::Design::ImageEditor
public class BitmapEditor : System.Drawing.Design.ImageEditor
[System.Security.SecurityCritical]
public class BitmapEditor : System.Drawing.Design.ImageEditor
[System.CLSCompliant(false)]
public class BitmapEditor : System.Drawing.Design.ImageEditor
type BitmapEditor = class
    inherit ImageEditor
[<System.Security.SecurityCritical>]
type BitmapEditor = class
    inherit ImageEditor
[<System.CLSCompliant(false)>]
type BitmapEditor = class
    inherit ImageEditor
Public Class BitmapEditor
Inherits ImageEditor
继承
属性

示例

下面的代码示例使用与 EditorAttribute 属性相关联 BitmapEditor

      [EditorAttribute(System::Drawing::Design::BitmapEditor::typeid,System::Drawing::Design::UITypeEditor::typeid)]
      Bitmap^ get()
      {
         return testBmp;
      }

      void set( Bitmap^ value )
      {
         testBmp = value;
      }
   }

private:
   Bitmap^ testBmp;
[EditorAttribute(typeof(System.Drawing.Design.BitmapEditor),
    typeof(System.Drawing.Design.UITypeEditor))]
public Bitmap testBitmap
{
    get
    {
        return testBmp;
    }
    set
    {
        testBmp = value;
    }
}
private Bitmap testBmp;
<EditorAttribute(GetType(System.Drawing.Design.BitmapEditor), _
    GetType(System.Drawing.Design.UITypeEditor))> _
Public Property testBitmap() As Bitmap
    Get
        Return testBmp
    End Get
    Set(ByVal Value As Bitmap)
        testBmp = Value
    End Set
End Property

Private testBmp As Bitmap

注解

BitmapEditor 类提供了一种为属性选择位图图像的简单方法。 启动编辑器将显示一个 “打开文件 ”对话框,该对话框允许目录导航和选择文件。 文件列表最初针对位图(.bmp)文件进行筛选。

构造函数

名称 说明
BitmapEditor()

初始化 BitmapEditor 类的新实例。

字段

名称 说明
BitmapExtensions

提供用于筛选文件列表的默认文件扩展名列表。

属性

名称 说明
IsDropDownResizable

获取一个值,该值指示用户是否应调整下拉列表编辑器的大小。

(继承自 UITypeEditor)

方法

名称 说明
EditValue(IServiceProvider, Object)

使用方法指示 GetEditStyle() 的编辑器样式编辑指定对象的值。

(继承自 UITypeEditor)
EditValue(ITypeDescriptorContext, IServiceProvider, Object)

使用方法提供的 GetEditStyle(ITypeDescriptorContext) 编辑样式编辑指定的对象值。

(继承自 ImageEditor)
Equals(Object)

确定指定的对象是否等于当前对象。

(继承自 Object)
GetEditStyle()

获取方法使用的 EditValue(IServiceProvider, Object) 编辑器样式。

(继承自 UITypeEditor)
GetEditStyle(ITypeDescriptorContext)

获取方法的 EditValue(ITypeDescriptorContext, IServiceProvider, Object) 编辑样式。

(继承自 ImageEditor)
GetExtensions()

获取位图编辑器最初用于筛选文件列表的文件列表筛选器的扩展名。

GetFileDialogDescription()

获取此编辑器提供的默认文件列表筛选器的说明。

GetHashCode()

用作默认哈希函数。

(继承自 Object)
GetImageExtenders()

获取支持的映像类型的数组。

(继承自 ImageEditor)
GetPaintValueSupported()

指示此编辑器是否支持绘制对象的值的表示形式。

(继承自 UITypeEditor)
GetPaintValueSupported(ITypeDescriptorContext)

获取一个值,该值指示此编辑器是否支持绘制对象的值的表示形式。

(继承自 ImageEditor)
GetType()

获取当前实例的 Type

(继承自 Object)
LoadFromStream(Stream)

从指定的流加载图像。

MemberwiseClone()

创建当前 Object的浅表副本。

(继承自 Object)
PaintValue(Object, Graphics, Rectangle)

将指定对象的值的表示形式绘制到指定的画布。

(继承自 UITypeEditor)
PaintValue(PaintValueEventArgs)

绘制由指定 PaintValueEventArgs值指示的值。

(继承自 ImageEditor)
ToString()

返回一个表示当前对象的字符串。

(继承自 Object)

适用于