-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expand file tree
/
Copy pathAnchorStyles.xml
More file actions
192 lines (186 loc) · 10.9 KB
/
AnchorStyles.xml
File metadata and controls
192 lines (186 loc) · 10.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<Type Name="AnchorStyles" FullName="System.Windows.Forms.AnchorStyles">
<TypeSignature Language="C#" Value="public enum AnchorStyles" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed AnchorStyles extends System.Enum" />
<TypeSignature Language="DocId" Value="T:System.Windows.Forms.AnchorStyles" />
<TypeSignature Language="VB.NET" Value="Public Enum AnchorStyles" />
<TypeSignature Language="F#" Value="type AnchorStyles = " />
<TypeSignature Language="C++ CLI" Value="public enum class AnchorStyles" />
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Enum</BaseTypeName>
</Base>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.Editor("System.Windows.Forms.Design.AnchorEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Editor("System.Windows.Forms.Design.AnchorEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Flags]</AttributeName>
<AttributeName Language="F#">[<System.Flags>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Specifies how a control anchors to the edges of its container.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When a control is anchored to an edge of its container, the distance between the control and the specified edge remains constant when the container resizes. For example, if a control is anchored to the right edge of its container, the distance between the right edge of the control and the right edge of the container remains constant when the container resizes. A control can be anchored to any combination of control edges. If the control is anchored to opposite edges of its container (for example, to the top and bottom), it resizes when the container resizes. If a control has its <xref:System.Windows.Forms.Control.Anchor> property set to None, the control moves half of the distance that the container of the control is resized. For example, if a <xref:System.Windows.Forms.Button> has its <xref:System.Windows.Forms.Control.Anchor> property set to None and the <xref:System.Windows.Forms.Form> that the control is located on is resized by 20 pixels in either direction, the button will be moved 10 pixels in both directions.
## Examples
The following example adds a <xref:System.Windows.Forms.Button> to a form and sets some of its common properties. The example anchors the button to the bottom-right corner of the form so it keeps its relative position as the form is resized. Next it sets the <xref:System.Windows.Forms.Control.BackgroundImage*> and resizes the button to the same size as the <xref:System.Drawing.Image>. The example then sets the <xref:System.Windows.Forms.Control.TabStop*> to `true` and sets the <xref:System.Windows.Forms.Control.TabIndex> property. Lastly, it adds an event handler to handle the <xref:System.Windows.Forms.Control.Click> event of the button. This example assumes you have an <xref:System.Windows.Forms.ImageList> named `imageList1`.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Properties/CPP/controlproperties.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AnchorStyles/Overview/controlproperties.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/AnchorStyles/Overview/controlproperties.vb" id="Snippet3":::
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.Control.Anchor" />
</Docs>
<Members>
<Member MemberName="Bottom">
<MemberSignature Language="C#" Value="Bottom" />
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.Windows.Forms.AnchorStyles Bottom = int32(2)" />
<MemberSignature Language="DocId" Value="F:System.Windows.Forms.AnchorStyles.Bottom" />
<MemberSignature Language="VB.NET" Value="Bottom" />
<MemberSignature Language="F#" Value="Bottom = 2" Usage="System.Windows.Forms.AnchorStyles.Bottom" />
<MemberSignature Language="C++ CLI" Value="Bottom" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Forms.AnchorStyles</ReturnType>
</ReturnValue>
<MemberValue>2</MemberValue>
<Docs>
<summary>The control is anchored to the bottom edge of its container.</summary>
</Docs>
</Member>
<Member MemberName="Left">
<MemberSignature Language="C#" Value="Left" />
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.Windows.Forms.AnchorStyles Left = int32(4)" />
<MemberSignature Language="DocId" Value="F:System.Windows.Forms.AnchorStyles.Left" />
<MemberSignature Language="VB.NET" Value="Left" />
<MemberSignature Language="F#" Value="Left = 4" Usage="System.Windows.Forms.AnchorStyles.Left" />
<MemberSignature Language="C++ CLI" Value="Left" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Forms.AnchorStyles</ReturnType>
</ReturnValue>
<MemberValue>4</MemberValue>
<Docs>
<summary>The control is anchored to the left edge of its container.</summary>
</Docs>
</Member>
<Member MemberName="None">
<MemberSignature Language="C#" Value="None" />
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.Windows.Forms.AnchorStyles None = int32(0)" />
<MemberSignature Language="DocId" Value="F:System.Windows.Forms.AnchorStyles.None" />
<MemberSignature Language="VB.NET" Value="None" />
<MemberSignature Language="F#" Value="None = 0" Usage="System.Windows.Forms.AnchorStyles.None" />
<MemberSignature Language="C++ CLI" Value="None" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Forms.AnchorStyles</ReturnType>
</ReturnValue>
<MemberValue>0</MemberValue>
<Docs>
<summary>The control is not anchored to any edges of its container.</summary>
</Docs>
</Member>
<Member MemberName="Right">
<MemberSignature Language="C#" Value="Right" />
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.Windows.Forms.AnchorStyles Right = int32(8)" />
<MemberSignature Language="DocId" Value="F:System.Windows.Forms.AnchorStyles.Right" />
<MemberSignature Language="VB.NET" Value="Right" />
<MemberSignature Language="F#" Value="Right = 8" Usage="System.Windows.Forms.AnchorStyles.Right" />
<MemberSignature Language="C++ CLI" Value="Right" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Forms.AnchorStyles</ReturnType>
</ReturnValue>
<MemberValue>8</MemberValue>
<Docs>
<summary>The control is anchored to the right edge of its container.</summary>
</Docs>
</Member>
<Member MemberName="Top">
<MemberSignature Language="C#" Value="Top" />
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.Windows.Forms.AnchorStyles Top = int32(1)" />
<MemberSignature Language="DocId" Value="F:System.Windows.Forms.AnchorStyles.Top" />
<MemberSignature Language="VB.NET" Value="Top" />
<MemberSignature Language="F#" Value="Top = 1" Usage="System.Windows.Forms.AnchorStyles.Top" />
<MemberSignature Language="C++ CLI" Value="Top" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Forms.AnchorStyles</ReturnType>
</ReturnValue>
<MemberValue>1</MemberValue>
<Docs>
<summary>The control is anchored to the top edge of its container.</summary>
</Docs>
</Member>
</Members>
</Type>