Uredi

Deli z drugimi prek


BitmapEditor Class

Definition

Important

This API is not CLS-compliant.

Provides a user interface for selecting bitmap files in a property browser.

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
Inheritance
Attributes

Examples

The following code example uses an EditorAttribute to associate the BitmapEditor with a property.

      [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

Remarks

The BitmapEditor class provides a simple way to select a bitmap image for a property. Starting the editor displays an Open File dialog box that allows directory navigation and selecting a file. The file list is initially filtered for bitmap (.bmp) files.

Constructors

BitmapEditor()

Initializes a new instance of the BitmapEditor class.

Fields

BitmapExtensions

Provides the list of default file extensions used to filter the file list.

Properties

IsDropDownResizable

Gets a value indicating whether drop-down editors should be resizable by the user.

(Inherited from UITypeEditor)

Methods

EditValue(IServiceProvider, Object)

Edits the value of the specified object using the editor style indicated by the GetEditStyle() method.

(Inherited from UITypeEditor)
EditValue(ITypeDescriptorContext, IServiceProvider, Object)

Edits the specified object value using the edit style provided by the GetEditStyle(ITypeDescriptorContext) method.

(Inherited from ImageEditor)
Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetEditStyle()

Gets the editor style used by the EditValue(IServiceProvider, Object) method.

(Inherited from UITypeEditor)
GetEditStyle(ITypeDescriptorContext)

Gets the editing style of the EditValue(ITypeDescriptorContext, IServiceProvider, Object) method.

(Inherited from ImageEditor)
GetExtensions()

Gets the extensions for the file list filter that the bitmap editor will initially use to filter the file list.

GetFileDialogDescription()

Gets the description for the default file list filter provided by this editor.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetImageExtenders()

Gets an array of supported image types.

(Inherited from ImageEditor)
GetPaintValueSupported()

Indicates whether this editor supports painting a representation of an object's value.

(Inherited from UITypeEditor)
GetPaintValueSupported(ITypeDescriptorContext)

Gets a value indicating whether this editor supports painting a representation of an object's value.

(Inherited from ImageEditor)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
LoadFromStream(Stream)

Loads an image from the specified stream.

MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
PaintValue(Object, Graphics, Rectangle)

Paints a representation of the value of the specified object to the specified canvas.

(Inherited from UITypeEditor)
PaintValue(PaintValueEventArgs)

Paints a value indicated by the specified PaintValueEventArgs.

(Inherited from ImageEditor)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to