Gets or sets the edges of the container to which a control is bound and determines how a control is resized with its parent. 
         
             
            
Syntax
| Visual Basic (Declaration) |   | 
|---|
<SRDescriptionAttribute("Defines the edges of the container to which a certain control is bound. When a control is anchored to an edge, the distance between the control's closest edge and the specified edge will remain constant. ")>
<RefreshPropertiesAttribute(RefreshProperties.Repaint)>
<LocalizableAttribute(True)>
<DefaultValueAttribute()>
<SRCategoryAttribute("Layout")>
Public Overridable Property Anchor As AnchorStyles | 
 
| C# |   | 
|---|
[SRDescriptionAttribute("Defines the edges of the container to which a certain control is bound. When a control is anchored to an edge, the distance between the control's closest edge and the specified edge will remain constant. ")]
[RefreshPropertiesAttribute(RefreshProperties.Repaint)]
[LocalizableAttribute(true)]
[DefaultValueAttribute()]
[SRCategoryAttribute("Layout")]
public virtual AnchorStyles Anchor {get; set;} | 
 
             
             
            Property Value
A bitwise combination of the 
System.Windows.Forms.AnchorStyles values. The default is Top and Left.
  
             
             
             
             
            
            
            
Requirements
Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7 
 
            
            
See Also