Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
BitmapEditor Class

BitmapEditor Class

Provides a user interface for selecting bitmap files in a properties window.

For a list of all members of this type, see BitmapEditor Members.

System.Object
   System.Drawing.Design.UITypeEditor
      System.Drawing.Design.ImageEditor
         System.Drawing.Design.BitmapEditor

[Visual Basic]
Public Class BitmapEditor
   Inherits ImageEditor
[C#]
public class BitmapEditor : ImageEditor
[C++]
public __gc class BitmapEditor : public ImageEditor
[JScript]
public class BitmapEditor extends ImageEditor

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Remarks

BitmapEditor 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.

Example

[Visual Basic, C#, C++] The following code example uses an EditorAttribute to associate the System.Drawing.BitmapEditor with a property.

[Visual Basic] 
<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

[C#] 
[EditorAttribute(typeof(System.Drawing.Design.BitmapEditor), 
    typeof(System.Drawing.Design.UITypeEditor))]
public Bitmap testBitmap
{
    get
    {
        return testBmp;
    }
    set
    {
        testBmp = value;
    }
}
private Bitmap testBmp;

[C++] 
public:
   [EditorAttribute(__typeof(System::Drawing::Design::BitmapEditor), __typeof(System::Drawing::Design::UITypeEditor))]
   __property Bitmap* get_testBitmap() {
      return testBmp;
   }
   __property void set_testBitmap(Bitmap* value) {
      testBmp = value;
   }

private:
   Bitmap*  testBmp;

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Namespace: System.Drawing.Design

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: System.Drawing.Design (in System.Drawing.Design.dll)

See Also

BitmapEditor Members | System.Drawing.Design Namespace

Show:
© 2015 Microsoft