Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ImageEditor Class

Provides a user interface for selecting an image for a property in a property grid.

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

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

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

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

ImageEditor is a UITypeEditor that provides a user interface for selecting an 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 by the default file name extensions for the editor.

Example

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

[Visual Basic] 
<EditorAttribute(GetType(System.Drawing.Design.ImageEditor), GetType(System.Drawing.Design.UITypeEditor))>  _
Public Property testImage() As Image
   Get
      Return testImg
   End Get
   Set
      testImg = value
   End Set
End Property
Private testImg As Image

[C#] 
[EditorAttribute(typeof(System.Drawing.Design.ImageEditor), typeof(System.Drawing.Design.UITypeEditor))]
public Image testImage
{
    get
    {
        return testImg;
    }
    set
    {
        testImg = value;
    }
}
private Image testImg;                

[C++] 
public:
    [EditorAttribute(__typeof(System::Drawing::Design::ImageEditor),
        __typeof(System::Drawing::Design::UITypeEditor))]
    __property Image* get_testImage() {
        return testImg;
    }
    [EditorAttribute(__typeof(System::Drawing::Design::ImageEditor),
        __typeof(System::Drawing::Design::UITypeEditor))]
    __property void set_testImage(Image* value) {
        testImg = value;
    }
private:
    Image*  testImg;

[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

ImageEditor Members | System.Drawing.Design Namespace | UITypeEditor

Show:
© 2015 Microsoft