-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
ToolStripLayoutStyle.xml
215 lines (190 loc) · 13.6 KB
/
ToolStripLayoutStyle.xml
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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<Type Name="ToolStripLayoutStyle" FullName="System.Windows.Forms.ToolStripLayoutStyle">
<TypeSignature Language="C#" Value="public enum ToolStripLayoutStyle" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed ToolStripLayoutStyle extends System.Enum" />
<TypeSignature Language="DocId" Value="T:System.Windows.Forms.ToolStripLayoutStyle" />
<TypeSignature Language="VB.NET" Value="Public Enum ToolStripLayoutStyle" />
<TypeSignature Language="F#" Value="type ToolStripLayoutStyle = " />
<TypeSignature Language="C++ CLI" Value="public enum class ToolStripLayoutStyle" />
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<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>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Enum</BaseTypeName>
</Base>
<Docs>
<summary>Specifies the possible alignments with which the items of a <see cref="T:System.Windows.Forms.ToolStrip" /> can be displayed.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You control the layout of the <xref:System.Windows.Forms.ToolStrip> class and its derived classes by assigning a member of the <xref:System.Windows.Forms.ToolStripLayoutStyle> enumeration to the control's `LayoutStyle` property, such as the <xref:System.Windows.Forms.ToolStrip.LayoutStyle%2A?displayProperty=nameWithType> or <xref:System.Windows.Forms.StatusStrip.LayoutStyle?displayProperty=nameWithType> property.
#### Stack Layouts
Stacking arranges items beside each other at both ends of the tool strip. The following list describes the stack layouts.
- StackWithOverflow causes the tool strip to alter its layout automatically in accordance with the control's `Orientation` property to handle dragging and docking scenarios.
- VerticalStackWithOverflow renders the `Orientation` items beside each other vertically.
- HorizontalStackWithOverflow renders the `Orientation` items beside each other horizontally.
#### Other Features of Stack Layouts
<xref:System.Windows.Forms.ToolStripItem.Alignment%2A> determines the end of the <xref:System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow> to which the item is aligned.
When items do not fit within the <xref:System.Windows.Forms.ToolStrip>, an overflow button automatically appears. The <xref:System.Windows.Forms.ToolStripItem.Overflow%2A> property setting determines whether an item appears in the overflow area always, as needed, or never.
In the <xref:System.Windows.Forms.ToolStrip.LayoutCompleted> event, you can inspect the <xref:System.Windows.Forms.ToolStripItem.Placement%2A> property to determine whether an item was placed on the main <xref:System.Windows.Forms.ToolStripItem.Overflow%2A>, the overflow <xref:System.Windows.Forms.ToolStrip.LayoutCompleted>, or if it is not currently showing at all. The typical reasons why an item is not displayed are that the item did not fit on the main <xref:System.Windows.Forms.ToolStripItem.Placement%2A> and its <xref:System.Windows.Forms.ToolStripItem.Overflow%2A> property was set to <xref:System.Windows.Forms.ToolStripItemOverflow>.
Make a <xref:System.Windows.Forms.ToolStrip> movable by putting it in a <xref:System.Windows.Forms.ToolStripPanel> and setting its <xref:System.Windows.Forms.ToolStrip.GripStyle%2A> to <xref:System.Windows.Forms.ToolStripGripStyle>.
#### Other Layout Options
The other layout options are Flow and Table.
#### Flow Layout
Flow layout is the default for <xref:System.Windows.Forms.ContextMenuStrip>, <xref:System.Windows.Forms.ToolStripDropDownMenu>, and <xref:System.Windows.Forms.ToolStripOverflow>. It is similar to the <xref:System.Windows.Forms.FlowLayoutPanel>. The features of Flow layout are as follows:
- All of the features of <xref:System.Windows.Forms.FlowLayoutPanel> are exposed by the <xref:System.Windows.Forms.ToolStrip.LayoutSettings%2A> property. You must cast the <xref:System.Windows.Forms.LayoutSettings> class to a <xref:System.Windows.Forms.FlowLayoutSettings> class.
- You can use the <xref:System.Windows.Forms.ToolStripItem.Dock%2A> and <xref:System.Windows.Forms.ToolStripItem.Anchor%2A> properties in code to align the items within the row.
- The <xref:System.Windows.Forms.ToolStripItem.Alignment%2A> property is ignored.
- In the <xref:System.Windows.Forms.ToolStrip.LayoutCompleted> event, you can inspect the <xref:System.Windows.Forms.ToolStripItem.Placement%2A> property to determine whether an item was placed on the main <xref:System.Windows.Forms.ToolStrip> or did not fit.
- The grip is not rendered, and therefore a <xref:System.Windows.Forms.ToolStrip> in Flow layout style in a <xref:System.Windows.Forms.ToolStripPanel> cannot be moved.
- The <xref:System.Windows.Forms.ToolStripItem.Anchor%2A> overflow button is not rendered, and <xref:System.Windows.Forms.ToolStripItem.Overflow%2A> is ignored.
#### Table Layout
Table layout is the default for <xref:System.Windows.Forms.StatusStrip>. It is similar to <xref:System.Windows.Forms.TableLayoutPanel>. The features of Table layout are as follows:
- All of the features of <xref:System.Windows.Forms.TableLayoutPanel> are exposed by the <xref:System.Windows.Forms.ToolStrip.LayoutSettings%2A> property. You must cast the <xref:System.Windows.Forms.LayoutSettings> class to a <xref:System.Windows.Forms.TableLayoutSettings> class.
- You can use the <xref:System.Windows.Forms.ToolStripItem.Dock%2A> and <xref:System.Windows.Forms.ToolStripItem.Anchor%2A> properties in code to align the items within the table cell.
- The <xref:System.Windows.Forms.ToolStripItem.Alignment%2A> property is ignored.
- In the <xref:System.Windows.Forms.ToolStrip.LayoutCompleted> event, you can inspect the <xref:System.Windows.Forms.ToolStripItem.Placement%2A> property to determine whether an item was placed on the main <xref:System.Windows.Forms.ToolStripLayoutStyle.Table> or did not fit.
- The grip is not rendered, and therefore a <xref:System.Windows.Forms.ToolStrip> in Table layout style in a <xref:System.Windows.Forms.ToolStripPanel> cannot be moved.
- The <xref:System.Windows.Forms.ToolStrip> overflow button is not rendered, and <xref:System.Windows.Forms.ToolStripItem.Overflow%2A> is ignored.
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName="Flow">
<MemberSignature Language="C#" Value="Flow" />
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.Windows.Forms.ToolStripLayoutStyle Flow = int32(3)" />
<MemberSignature Language="DocId" Value="F:System.Windows.Forms.ToolStripLayoutStyle.Flow" />
<MemberSignature Language="VB.NET" Value="Flow" />
<MemberSignature Language="F#" Value="Flow = 3" Usage="System.Windows.Forms.ToolStripLayoutStyle.Flow" />
<MemberSignature Language="C++ CLI" Value="Flow" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<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>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Forms.ToolStripLayoutStyle</ReturnType>
</ReturnValue>
<MemberValue>3</MemberValue>
<Docs>
<summary>Specifies that items flow horizontally or vertically as necessary.</summary>
</Docs>
</Member>
<Member MemberName="HorizontalStackWithOverflow">
<MemberSignature Language="C#" Value="HorizontalStackWithOverflow" />
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.Windows.Forms.ToolStripLayoutStyle HorizontalStackWithOverflow = int32(1)" />
<MemberSignature Language="DocId" Value="F:System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow" />
<MemberSignature Language="VB.NET" Value="HorizontalStackWithOverflow" />
<MemberSignature Language="F#" Value="HorizontalStackWithOverflow = 1" Usage="System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow" />
<MemberSignature Language="C++ CLI" Value="HorizontalStackWithOverflow" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<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>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Forms.ToolStripLayoutStyle</ReturnType>
</ReturnValue>
<MemberValue>1</MemberValue>
<Docs>
<summary>Specifies that items are laid out horizontally and overflow as necessary.</summary>
</Docs>
</Member>
<Member MemberName="StackWithOverflow">
<MemberSignature Language="C#" Value="StackWithOverflow" />
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.Windows.Forms.ToolStripLayoutStyle StackWithOverflow = int32(0)" />
<MemberSignature Language="DocId" Value="F:System.Windows.Forms.ToolStripLayoutStyle.StackWithOverflow" />
<MemberSignature Language="VB.NET" Value="StackWithOverflow" />
<MemberSignature Language="F#" Value="StackWithOverflow = 0" Usage="System.Windows.Forms.ToolStripLayoutStyle.StackWithOverflow" />
<MemberSignature Language="C++ CLI" Value="StackWithOverflow" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<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>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Forms.ToolStripLayoutStyle</ReturnType>
</ReturnValue>
<MemberValue>0</MemberValue>
<Docs>
<summary>Specifies that items are laid out automatically.</summary>
</Docs>
</Member>
<Member MemberName="Table">
<MemberSignature Language="C#" Value="Table" />
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.Windows.Forms.ToolStripLayoutStyle Table = int32(4)" />
<MemberSignature Language="DocId" Value="F:System.Windows.Forms.ToolStripLayoutStyle.Table" />
<MemberSignature Language="VB.NET" Value="Table" />
<MemberSignature Language="F#" Value="Table = 4" Usage="System.Windows.Forms.ToolStripLayoutStyle.Table" />
<MemberSignature Language="C++ CLI" Value="Table" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<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>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Forms.ToolStripLayoutStyle</ReturnType>
</ReturnValue>
<MemberValue>4</MemberValue>
<Docs>
<summary>Specifies that items are laid out flush left.</summary>
</Docs>
</Member>
<Member MemberName="VerticalStackWithOverflow">
<MemberSignature Language="C#" Value="VerticalStackWithOverflow" />
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.Windows.Forms.ToolStripLayoutStyle VerticalStackWithOverflow = int32(2)" />
<MemberSignature Language="DocId" Value="F:System.Windows.Forms.ToolStripLayoutStyle.VerticalStackWithOverflow" />
<MemberSignature Language="VB.NET" Value="VerticalStackWithOverflow" />
<MemberSignature Language="F#" Value="VerticalStackWithOverflow = 2" Usage="System.Windows.Forms.ToolStripLayoutStyle.VerticalStackWithOverflow" />
<MemberSignature Language="C++ CLI" Value="VerticalStackWithOverflow" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<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>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Forms.ToolStripLayoutStyle</ReturnType>
</ReturnValue>
<MemberValue>2</MemberValue>
<Docs>
<summary>Specifies that items are laid out vertically, are centered within the control, and overflow as necessary.</summary>
</Docs>
</Member>
</Members>
</Type>