Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

AnchorEditor Class

Provides a user interface for configuring an Anchor property.

Namespace: System.Windows.Forms.Design
Assembly: System.Design (in system.design.dll)

public sealed class AnchorEditor : UITypeEditor
public final class AnchorEditor extends UITypeEditor
public final class AnchorEditor extends UITypeEditor

The AnchorEditor provides a design-time user interface for configuring an Anchor property. An Anchor property is typically used to determine which sides of the container a control is bound to. This class provides a drop-down graphical control that allows the user to specify which sides of the container to anchor the control to.

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

[EditorAttribute(typeof(System.Windows.Forms.Design.AnchorEditor), typeof(System.Drawing.Design.UITypeEditor))]
public System.Windows.Forms.AnchorStyles testAnchor
{
    get
    {
        return anchor;
    }
    set
    {
        anchor = value;
    }
}
private AnchorStyles anchor;       

/** @attribute EditorAttribute(System.Windows.Forms.Design.AnchorEditor.
    class, System.Drawing.Design.UITypeEditor.class)
 */
/** @property 
 */
public System.Windows.Forms.AnchorStyles get_TestAnchor()
{
    return anchor;
} //get_TestAnchor

/** @property 
 */
public void set_TestAnchor(System.Windows.Forms.AnchorStyles value)
{
    anchor = value;
} //set_TestAnchor

private AnchorStyles anchor;

System.Object
   System.Drawing.Design.UITypeEditor
    System.Windows.Forms.Design.AnchorEditor
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 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 .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.