Export (0) Print
Expand All
1 out of 3 rated this helpful - Rate this topic

ImageEditor Class

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

Namespace: System.Drawing.Design
Assembly: System.Drawing.Design (in system.drawing.design.dll)

public class ImageEditor : UITypeEditor
public class ImageEditor extends UITypeEditor
public class ImageEditor extends UITypeEditor
Not applicable.

An ImageEditor is a UITypeEditor that provides a user interface for the user to select an image for a property. When the user starts the editor, it displays an Open File dialog box that enables the user to navigate to a directory and select a file. The file list is initially filtered by the default file name extensions for the editor.

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

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

/** @attribute EditorAttribute(System.Drawing.Design.ImageEditor.class,
    System.Drawing.Design.UITypeEditor.class)
 */
/** @property 
 */
public Image get_TestImage()
{
    return testImg;
} //get_TestImage

/** @property 
 */
public void set_TestImage(Image value)
{
    testImg = value;
} //set_TestImage

private Image testImg;

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

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.