AnchorEditor Class
Provides a user interface for configuring an Anchor property.
For a list of all members of this type, see AnchorEditor Members.
System.Object
System.Drawing.Design.UITypeEditor
System.Windows.Forms.Design.AnchorEditor
[Visual Basic] NotInheritable Public Class AnchorEditor Inherits UITypeEditor [C#] public sealed class AnchorEditor : UITypeEditor [C++] public __gc __sealed class AnchorEditor : public UITypeEditor [JScript] public class AnchorEditor 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
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.
Example
[Visual Basic, C#, C++] The following code example uses an EditorAttribute to associate the System.Drawing.AnchorEditor with a property.
[Visual Basic] <EditorAttribute(GetType(System.Windows.Forms.Design.AnchorEditor), GetType(System.Drawing.Design.UITypeEditor))> _ Public Property testAnchor() As System.Windows.Forms.AnchorStyles Get Return anchor End Get Set anchor = value End Set End Property Private anchor As AnchorStyles [C#] [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; [C++] public: [EditorAttribute(__typeof(System::Windows::Forms::Design::AnchorEditor), __typeof(System::Drawing::Design::UITypeEditor))] __property System::Windows::Forms::AnchorStyles get_testAnchor() { return anchor; } [EditorAttribute(__typeof(System::Windows::Forms::Design::AnchorEditor), __typeof(System::Drawing::Design::UITypeEditor))] __property void set_testAnchor(System::Windows::Forms::AnchorStyles value) { anchor = value; } private: AnchorStyles anchor;
[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button
in the upper-left corner of the page.
Requirements
Namespace: System.Windows.Forms.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.Design (in System.Design.dll)
See Also
AnchorEditor Members | System.Windows.Forms.Design Namespace | Anchor