/
ComboBoxRenderer.xml
524 lines (466 loc) · 41.6 KB
/
ComboBoxRenderer.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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
<Type Name="ComboBoxRenderer" FullName="System.Windows.Forms.ComboBoxRenderer">
<TypeSignature Language="C#" Value="public sealed class ComboBoxRenderer" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;windowsdesktop-3.0;windowsdesktop-3.1" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit ComboBoxRenderer extends System.Object" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;windowsdesktop-3.0;windowsdesktop-3.1" />
<TypeSignature Language="DocId" Value="T:System.Windows.Forms.ComboBoxRenderer" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class ComboBoxRenderer" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;windowsdesktop-3.0;windowsdesktop-3.1" />
<TypeSignature Language="F#" Value="type ComboBoxRenderer = class" />
<TypeSignature Language="C++ CLI" Value="public ref class ComboBoxRenderer sealed" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;windowsdesktop-3.0;windowsdesktop-3.1" />
<TypeSignature Language="C#" Value="public static class ComboBoxRenderer" FrameworkAlternate="windowsdesktop-5.0;windowsdesktop-6.0;windowsdesktop-7.0;windowsdesktop-8.0;windowsdesktop-9.0" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract sealed beforefieldinit ComboBoxRenderer extends System.Object" FrameworkAlternate="windowsdesktop-5.0;windowsdesktop-6.0;windowsdesktop-7.0;windowsdesktop-8.0;windowsdesktop-9.0" />
<TypeSignature Language="VB.NET" Value="Public Class ComboBoxRenderer" FrameworkAlternate="windowsdesktop-5.0;windowsdesktop-6.0;windowsdesktop-7.0;windowsdesktop-8.0;windowsdesktop-9.0" />
<TypeSignature Language="C++ CLI" Value="public ref class ComboBoxRenderer abstract sealed" FrameworkAlternate="windowsdesktop-5.0;windowsdesktop-6.0;windowsdesktop-7.0;windowsdesktop-8.0;windowsdesktop-9.0" />
<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.Object</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute FrameworkAlternate="windowsdesktop-8.0;windowsdesktop-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(0)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(0)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="windowsdesktop-8.0;windowsdesktop-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.NullableContext(1)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.NullableContext(1)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Provides methods used to render a combo box control with visual styles. This class cannot be inherited.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.ComboBoxRenderer> class provides a set of `static` methods that can be used to render a combo box control with the current visual style of the operating system. Rendering a control refers to drawing the user interface of a control. This is useful if you are drawing a custom control that should have the appearance of the current visual style. To draw a combo box, use the <xref:System.Windows.Forms.ComboBoxRenderer.DrawTextBox%2A> method to draw the text box and the <xref:System.Windows.Forms.ComboBoxRenderer.DrawDropDownButton%2A> method to draw the drop-down arrow.
If visual styles are enabled in the operating system and visual styles are applied to the client area of application windows, <xref:System.Windows.Forms.ComboBoxRenderer.DrawTextBox%2A> and <xref:System.Windows.Forms.ComboBoxRenderer.DrawDropDownButton%2A> will draw the combo box with the current visual style. Otherwise, these methods will throw an <xref:System.InvalidOperationException>. To determine whether the members of this class can be used, you can check the value of the <xref:System.Windows.Forms.ComboBoxRenderer.IsSupported%2A> property.
This class wraps the functionality of a <xref:System.Windows.Forms.VisualStyles.VisualStyleRenderer?displayProperty=nameWithType> that is set to one of the elements exposed by the <xref:System.Windows.Forms.VisualStyles.VisualStyleElement.ComboBox.DropDownButton?displayProperty=nameWithType> and <xref:System.Windows.Forms.VisualStyles.VisualStyleElement.TextBox.TextEdit?displayProperty=nameWithType> classes. For more information, see [Rendering Controls with Visual Styles](/dotnet/framework/winforms/controls/rendering-controls-with-visual-styles).
## Examples
The following code example demonstrates how to create a custom control that uses the <xref:System.Windows.Forms.ComboBoxRenderer.DrawTextBox%2A> and <xref:System.Windows.Forms.ComboBoxRenderer.DrawDropDownButton%2A> methods to draw a combo box that responds to mouse clicks.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxRenderer/cpp/form1.cpp" id="Snippet0":::
:::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBoxRenderer/Overview/form1.cs" id="Snippet0":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxRenderer/VB/form1.vb" id="Snippet0":::
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.VisualStyles.VisualStyleRenderer" />
<altmember cref="T:System.Windows.Forms.VisualStyles.VisualStyleElement" />
</Docs>
<Members>
<Member MemberName="DrawDropDownButton">
<MemberSignature Language="C#" Value="public static void DrawDropDownButton (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, System.Windows.Forms.VisualStyles.ComboBoxState state);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void DrawDropDownButton(class System.Drawing.Graphics g, valuetype System.Drawing.Rectangle bounds, valuetype System.Windows.Forms.VisualStyles.ComboBoxState state) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ComboBoxRenderer.DrawDropDownButton(System.Drawing.Graphics,System.Drawing.Rectangle,System.Windows.Forms.VisualStyles.ComboBoxState)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub DrawDropDownButton (g As Graphics, bounds As Rectangle, state As ComboBoxState)" />
<MemberSignature Language="F#" Value="static member DrawDropDownButton : System.Drawing.Graphics * System.Drawing.Rectangle * System.Windows.Forms.VisualStyles.ComboBoxState -> unit" Usage="System.Windows.Forms.ComboBoxRenderer.DrawDropDownButton (g, bounds, state)" />
<MemberSignature Language="C++ CLI" Value="public:
 static void DrawDropDownButton(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::Windows::Forms::VisualStyles::ComboBoxState state);" />
<MemberType>Method</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.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="g" Type="System.Drawing.Graphics" />
<Parameter Name="bounds" Type="System.Drawing.Rectangle" />
<Parameter Name="state" Type="System.Windows.Forms.VisualStyles.ComboBoxState" />
</Parameters>
<Docs>
<param name="g">The <see cref="T:System.Drawing.Graphics" /> used to draw the drop-down arrow.</param>
<param name="bounds">The <see cref="T:System.Drawing.Rectangle" /> that specifies the bounds of the drop-down arrow.</param>
<param name="state">One of the <see cref="T:System.Windows.Forms.VisualStyles.ComboBoxState" /> values that specifies the visual state of the drop-down arrow.</param>
<summary>Draws a drop-down arrow with the current visual style of the operating system.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Before calling this method, you should verify that the <xref:System.Windows.Forms.ComboBoxRenderer.IsSupported%2A> property returns `true`.
## Examples
The following code example uses the <xref:System.Windows.Forms.ComboBoxRenderer.DrawDropDownButton%2A> method in a custom control's <xref:System.Windows.Forms.Control.OnPaint%2A> method to draw a drop-down arrow in the state determined by the location of the mouse pointer. This code example is part of a larger example provided for the <xref:System.Windows.Forms.ComboBoxRenderer> class.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxRenderer/cpp/form1.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBoxRenderer/Overview/form1.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxRenderer/VB/form1.vb" id="Snippet4":::
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The operating system does not support visual styles.
-or-
Visual styles are disabled by the user in the operating system.
-or-
Visual styles are not applied to the client area of application windows.</exception>
</Docs>
</Member>
<MemberGroup MemberName="DrawTextBox">
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Draws a text box with the current visual style of the operating system.</summary>
</Docs>
</MemberGroup>
<Member MemberName="DrawTextBox">
<MemberSignature Language="C#" Value="public static void DrawTextBox (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, System.Windows.Forms.VisualStyles.ComboBoxState state);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void DrawTextBox(class System.Drawing.Graphics g, valuetype System.Drawing.Rectangle bounds, valuetype System.Windows.Forms.VisualStyles.ComboBoxState state) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ComboBoxRenderer.DrawTextBox(System.Drawing.Graphics,System.Drawing.Rectangle,System.Windows.Forms.VisualStyles.ComboBoxState)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub DrawTextBox (g As Graphics, bounds As Rectangle, state As ComboBoxState)" />
<MemberSignature Language="F#" Value="static member DrawTextBox : System.Drawing.Graphics * System.Drawing.Rectangle * System.Windows.Forms.VisualStyles.ComboBoxState -> unit" Usage="System.Windows.Forms.ComboBoxRenderer.DrawTextBox (g, bounds, state)" />
<MemberSignature Language="C++ CLI" Value="public:
 static void DrawTextBox(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::Windows::Forms::VisualStyles::ComboBoxState state);" />
<MemberType>Method</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.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="g" Type="System.Drawing.Graphics" />
<Parameter Name="bounds" Type="System.Drawing.Rectangle" />
<Parameter Name="state" Type="System.Windows.Forms.VisualStyles.ComboBoxState" />
</Parameters>
<Docs>
<param name="g">The <see cref="T:System.Drawing.Graphics" /> used to draw the text box.</param>
<param name="bounds">The <see cref="T:System.Drawing.Rectangle" /> that specifies the bounds of the text box.</param>
<param name="state">One of the <see cref="T:System.Windows.Forms.VisualStyles.ComboBoxState" /> values that specifies the visual state of the text box.</param>
<summary>Draws a text box in the specified state and bounds.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Before calling this method, you should verify that the <xref:System.Windows.Forms.ComboBoxRenderer.IsSupported%2A> property returns `true`.
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The operating system does not support visual styles.
-or-
Visual styles are disabled by the user in the operating system.
-or-
Visual styles are not applied to the client area of application windows.</exception>
</Docs>
</Member>
<Member MemberName="DrawTextBox">
<MemberSignature Language="C#" Value="public static void DrawTextBox (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string comboBoxText, System.Drawing.Font font, System.Windows.Forms.VisualStyles.ComboBoxState state);" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;windowsdesktop-3.0;windowsdesktop-3.1;windowsdesktop-5.0;windowsdesktop-6.0" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void DrawTextBox(class System.Drawing.Graphics g, valuetype System.Drawing.Rectangle bounds, string comboBoxText, class System.Drawing.Font font, valuetype System.Windows.Forms.VisualStyles.ComboBoxState state) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ComboBoxRenderer.DrawTextBox(System.Drawing.Graphics,System.Drawing.Rectangle,System.String,System.Drawing.Font,System.Windows.Forms.VisualStyles.ComboBoxState)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub DrawTextBox (g As Graphics, bounds As Rectangle, comboBoxText As String, font As Font, state As ComboBoxState)" />
<MemberSignature Language="F#" Value="static member DrawTextBox : System.Drawing.Graphics * System.Drawing.Rectangle * string * System.Drawing.Font * System.Windows.Forms.VisualStyles.ComboBoxState -> unit" Usage="System.Windows.Forms.ComboBoxRenderer.DrawTextBox (g, bounds, comboBoxText, font, state)" />
<MemberSignature Language="C++ CLI" Value="public:
 static void DrawTextBox(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::String ^ comboBoxText, System::Drawing::Font ^ font, System::Windows::Forms::VisualStyles::ComboBoxState state);" />
<MemberSignature Language="C#" Value="public static void DrawTextBox (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string? comboBoxText, System.Drawing.Font? font, System.Windows.Forms.VisualStyles.ComboBoxState state);" FrameworkAlternate="windowsdesktop-7.0;windowsdesktop-8.0;windowsdesktop-9.0" />
<MemberType>Method</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>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="windowsdesktop-8.0;windowsdesktop-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.NullableContext(2)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.NullableContext(2)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="g" Type="System.Drawing.Graphics">
<Attributes>
<Attribute FrameworkAlternate="windowsdesktop-8.0;windowsdesktop-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(1)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(1)>]</AttributeName>
</Attribute>
</Attributes>
</Parameter>
<Parameter Name="bounds" Type="System.Drawing.Rectangle" />
<Parameter Name="comboBoxText" Type="System.String" />
<Parameter Name="font" Type="System.Drawing.Font" />
<Parameter Name="state" Type="System.Windows.Forms.VisualStyles.ComboBoxState" />
</Parameters>
<Docs>
<param name="g">The <see cref="T:System.Drawing.Graphics" /> used to draw the text box.</param>
<param name="bounds">The <see cref="T:System.Drawing.Rectangle" /> that specifies the bounds of the text box.</param>
<param name="comboBoxText">The <see cref="T:System.String" /> to draw in the text box.</param>
<param name="font">The <see cref="T:System.Drawing.Font" /> to apply to <paramref name="comboBoxText" />.</param>
<param name="state">One of the <see cref="T:System.Windows.Forms.VisualStyles.ComboBoxState" /> values that specifies the visual state of the text box.</param>
<summary>Draws a text box in the specified state and bounds, with the specified text.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Before calling this method, you should verify that the <xref:System.Windows.Forms.ComboBoxRenderer.IsSupported%2A> property returns `true`.
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The operating system does not support visual styles.
-or-
Visual styles are disabled by the user in the operating system.
-or-
Visual styles are not applied to the client area of application windows.</exception>
</Docs>
</Member>
<Member MemberName="DrawTextBox">
<MemberSignature Language="C#" Value="public static void DrawTextBox (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string comboBoxText, System.Drawing.Font font, System.Drawing.Rectangle textBounds, System.Windows.Forms.VisualStyles.ComboBoxState state);" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;windowsdesktop-3.0;windowsdesktop-3.1;windowsdesktop-5.0;windowsdesktop-6.0" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void DrawTextBox(class System.Drawing.Graphics g, valuetype System.Drawing.Rectangle bounds, string comboBoxText, class System.Drawing.Font font, valuetype System.Drawing.Rectangle textBounds, valuetype System.Windows.Forms.VisualStyles.ComboBoxState state) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ComboBoxRenderer.DrawTextBox(System.Drawing.Graphics,System.Drawing.Rectangle,System.String,System.Drawing.Font,System.Drawing.Rectangle,System.Windows.Forms.VisualStyles.ComboBoxState)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub DrawTextBox (g As Graphics, bounds As Rectangle, comboBoxText As String, font As Font, textBounds As Rectangle, state As ComboBoxState)" />
<MemberSignature Language="F#" Value="static member DrawTextBox : System.Drawing.Graphics * System.Drawing.Rectangle * string * System.Drawing.Font * System.Drawing.Rectangle * System.Windows.Forms.VisualStyles.ComboBoxState -> unit" Usage="System.Windows.Forms.ComboBoxRenderer.DrawTextBox (g, bounds, comboBoxText, font, textBounds, state)" />
<MemberSignature Language="C++ CLI" Value="public:
 static void DrawTextBox(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::String ^ comboBoxText, System::Drawing::Font ^ font, System::Drawing::Rectangle textBounds, System::Windows::Forms::VisualStyles::ComboBoxState state);" />
<MemberSignature Language="C#" Value="public static void DrawTextBox (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string? comboBoxText, System.Drawing.Font? font, System.Drawing.Rectangle textBounds, System.Windows.Forms.VisualStyles.ComboBoxState state);" FrameworkAlternate="windowsdesktop-7.0;windowsdesktop-8.0;windowsdesktop-9.0" />
<MemberType>Method</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>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="windowsdesktop-8.0;windowsdesktop-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.NullableContext(2)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.NullableContext(2)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="g" Type="System.Drawing.Graphics">
<Attributes>
<Attribute FrameworkAlternate="windowsdesktop-8.0;windowsdesktop-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(1)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(1)>]</AttributeName>
</Attribute>
</Attributes>
</Parameter>
<Parameter Name="bounds" Type="System.Drawing.Rectangle" />
<Parameter Name="comboBoxText" Type="System.String" />
<Parameter Name="font" Type="System.Drawing.Font" />
<Parameter Name="textBounds" Type="System.Drawing.Rectangle" />
<Parameter Name="state" Type="System.Windows.Forms.VisualStyles.ComboBoxState" />
</Parameters>
<Docs>
<param name="g">The <see cref="T:System.Drawing.Graphics" /> used to draw the text box.</param>
<param name="bounds">The <see cref="T:System.Drawing.Rectangle" /> that specifies the bounds of the text box.</param>
<param name="comboBoxText">The <see cref="T:System.String" /> to draw in the text box.</param>
<param name="font">The <see cref="T:System.Drawing.Font" /> to apply to <paramref name="comboBoxText" />.</param>
<param name="textBounds">The <see cref="T:System.Drawing.Rectangle" /> that specifies the bounds in which to draw <paramref name="comboBoxText" />.</param>
<param name="state">One of the <see cref="T:System.Windows.Forms.VisualStyles.ComboBoxState" /> values that specifies the visual state of the text box.</param>
<summary>Draws a text box in the specified state and bounds, with the specified text and text bounds.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Before calling this method, you should verify that the <xref:System.Windows.Forms.ComboBoxRenderer.IsSupported%2A> property returns `true`.
## Examples
The following code example uses the <xref:System.Windows.Forms.ComboBoxRenderer.DrawTextBox%28System.Drawing.Graphics%2CSystem.Drawing.Rectangle%2CSystem.String%2CSystem.Drawing.Font%2CSystem.Windows.Forms.VisualStyles.ComboBoxState%29> method in a custom control's <xref:System.Windows.Forms.Control.OnPaint%2A> method to draw a text box. This code example is part of a larger example provided for the <xref:System.Windows.Forms.ComboBoxRenderer> class.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxRenderer/cpp/form1.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBoxRenderer/Overview/form1.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxRenderer/VB/form1.vb" id="Snippet4":::
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The operating system does not support visual styles.
-or-
Visual styles are disabled by the user in the operating system.
-or-
Visual styles are not applied to the client area of application windows.</exception>
</Docs>
</Member>
<Member MemberName="DrawTextBox">
<MemberSignature Language="C#" Value="public static void DrawTextBox (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string comboBoxText, System.Drawing.Font font, System.Windows.Forms.TextFormatFlags flags, System.Windows.Forms.VisualStyles.ComboBoxState state);" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;windowsdesktop-3.0;windowsdesktop-3.1;windowsdesktop-5.0;windowsdesktop-6.0" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void DrawTextBox(class System.Drawing.Graphics g, valuetype System.Drawing.Rectangle bounds, string comboBoxText, class System.Drawing.Font font, valuetype System.Windows.Forms.TextFormatFlags flags, valuetype System.Windows.Forms.VisualStyles.ComboBoxState state) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ComboBoxRenderer.DrawTextBox(System.Drawing.Graphics,System.Drawing.Rectangle,System.String,System.Drawing.Font,System.Windows.Forms.TextFormatFlags,System.Windows.Forms.VisualStyles.ComboBoxState)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub DrawTextBox (g As Graphics, bounds As Rectangle, comboBoxText As String, font As Font, flags As TextFormatFlags, state As ComboBoxState)" />
<MemberSignature Language="F#" Value="static member DrawTextBox : System.Drawing.Graphics * System.Drawing.Rectangle * string * System.Drawing.Font * System.Windows.Forms.TextFormatFlags * System.Windows.Forms.VisualStyles.ComboBoxState -> unit" Usage="System.Windows.Forms.ComboBoxRenderer.DrawTextBox (g, bounds, comboBoxText, font, flags, state)" />
<MemberSignature Language="C++ CLI" Value="public:
 static void DrawTextBox(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::String ^ comboBoxText, System::Drawing::Font ^ font, System::Windows::Forms::TextFormatFlags flags, System::Windows::Forms::VisualStyles::ComboBoxState state);" />
<MemberSignature Language="C#" Value="public static void DrawTextBox (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string? comboBoxText, System.Drawing.Font? font, System.Windows.Forms.TextFormatFlags flags, System.Windows.Forms.VisualStyles.ComboBoxState state);" FrameworkAlternate="windowsdesktop-7.0;windowsdesktop-8.0;windowsdesktop-9.0" />
<MemberType>Method</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>
<Attributes>
<Attribute FrameworkAlternate="windowsdesktop-8.0;windowsdesktop-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.NullableContext(2)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.NullableContext(2)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="g" Type="System.Drawing.Graphics">
<Attributes>
<Attribute FrameworkAlternate="windowsdesktop-8.0;windowsdesktop-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(1)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(1)>]</AttributeName>
</Attribute>
</Attributes>
</Parameter>
<Parameter Name="bounds" Type="System.Drawing.Rectangle" />
<Parameter Name="comboBoxText" Type="System.String" />
<Parameter Name="font" Type="System.Drawing.Font" />
<Parameter Name="flags" Type="System.Windows.Forms.TextFormatFlags" />
<Parameter Name="state" Type="System.Windows.Forms.VisualStyles.ComboBoxState" />
</Parameters>
<Docs>
<param name="g">The <see cref="T:System.Drawing.Graphics" /> used to draw the text box.</param>
<param name="bounds">The <see cref="T:System.Drawing.Rectangle" /> that specifies the bounds of the text box.</param>
<param name="comboBoxText">The <see cref="T:System.String" /> to draw in the text box.</param>
<param name="font">The <see cref="T:System.Drawing.Font" /> to apply to <paramref name="comboBoxText" />.</param>
<param name="flags">A bitwise combination of the <see cref="T:System.Windows.Forms.TextFormatFlags" /> values.</param>
<param name="state">One of the <see cref="T:System.Windows.Forms.VisualStyles.ComboBoxState" /> values that specifies the visual state of the text box.</param>
<summary>Draws a text box in the specified state and bounds, with the specified text and text formatting.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Before calling this method, you should verify that the <xref:System.Windows.Forms.ComboBoxRenderer.IsSupported%2A> property returns `true`.
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The operating system does not support visual styles.
-or-
Visual styles are disabled by the user in the operating system.
-or-
Visual styles are not applied to the client area of application windows.</exception>
</Docs>
</Member>
<Member MemberName="DrawTextBox">
<MemberSignature Language="C#" Value="public static void DrawTextBox (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string comboBoxText, System.Drawing.Font font, System.Drawing.Rectangle textBounds, System.Windows.Forms.TextFormatFlags flags, System.Windows.Forms.VisualStyles.ComboBoxState state);" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;windowsdesktop-3.0;windowsdesktop-3.1;windowsdesktop-5.0;windowsdesktop-6.0" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void DrawTextBox(class System.Drawing.Graphics g, valuetype System.Drawing.Rectangle bounds, string comboBoxText, class System.Drawing.Font font, valuetype System.Drawing.Rectangle textBounds, valuetype System.Windows.Forms.TextFormatFlags flags, valuetype System.Windows.Forms.VisualStyles.ComboBoxState state) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.ComboBoxRenderer.DrawTextBox(System.Drawing.Graphics,System.Drawing.Rectangle,System.String,System.Drawing.Font,System.Drawing.Rectangle,System.Windows.Forms.TextFormatFlags,System.Windows.Forms.VisualStyles.ComboBoxState)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub DrawTextBox (g As Graphics, bounds As Rectangle, comboBoxText As String, font As Font, textBounds As Rectangle, flags As TextFormatFlags, state As ComboBoxState)" />
<MemberSignature Language="F#" Value="static member DrawTextBox : System.Drawing.Graphics * System.Drawing.Rectangle * string * System.Drawing.Font * System.Drawing.Rectangle * System.Windows.Forms.TextFormatFlags * System.Windows.Forms.VisualStyles.ComboBoxState -> unit" Usage="System.Windows.Forms.ComboBoxRenderer.DrawTextBox (g, bounds, comboBoxText, font, textBounds, flags, state)" />
<MemberSignature Language="C++ CLI" Value="public:
 static void DrawTextBox(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::String ^ comboBoxText, System::Drawing::Font ^ font, System::Drawing::Rectangle textBounds, System::Windows::Forms::TextFormatFlags flags, System::Windows::Forms::VisualStyles::ComboBoxState state);" />
<MemberSignature Language="C#" Value="public static void DrawTextBox (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string? comboBoxText, System.Drawing.Font? font, System.Drawing.Rectangle textBounds, System.Windows.Forms.TextFormatFlags flags, System.Windows.Forms.VisualStyles.ComboBoxState state);" FrameworkAlternate="windowsdesktop-7.0;windowsdesktop-8.0;windowsdesktop-9.0" />
<MemberType>Method</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>
<Attributes>
<Attribute FrameworkAlternate="windowsdesktop-8.0;windowsdesktop-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.NullableContext(2)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.NullableContext(2)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="g" Type="System.Drawing.Graphics">
<Attributes>
<Attribute FrameworkAlternate="windowsdesktop-8.0;windowsdesktop-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(1)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(1)>]</AttributeName>
</Attribute>
</Attributes>
</Parameter>
<Parameter Name="bounds" Type="System.Drawing.Rectangle" />
<Parameter Name="comboBoxText" Type="System.String" />
<Parameter Name="font" Type="System.Drawing.Font" />
<Parameter Name="textBounds" Type="System.Drawing.Rectangle" />
<Parameter Name="flags" Type="System.Windows.Forms.TextFormatFlags" />
<Parameter Name="state" Type="System.Windows.Forms.VisualStyles.ComboBoxState" />
</Parameters>
<Docs>
<param name="g">The <see cref="T:System.Drawing.Graphics" /> used to draw the text box.</param>
<param name="bounds">The <see cref="T:System.Drawing.Rectangle" /> that specifies the bounds of the text box.</param>
<param name="comboBoxText">The <see cref="T:System.String" /> to draw in the text box.</param>
<param name="font">The <see cref="T:System.Drawing.Font" /> to apply to <paramref name="comboBoxText" />.</param>
<param name="textBounds">The <see cref="T:System.Drawing.Rectangle" /> that specifies the bounds in which to draw <paramref name="comboBoxText" />.</param>
<param name="flags">A bitwise combination of the <see cref="T:System.Windows.Forms.TextFormatFlags" /> values.</param>
<param name="state">One of the <see cref="T:System.Windows.Forms.VisualStyles.ComboBoxState" /> values that specifies the visual state of the text box.</param>
<summary>Draws a text box in the specified state and bounds, with the specified text, text formatting, and text bounds.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Before calling this method, you should verify that the <xref:System.Windows.Forms.ComboBoxRenderer.IsSupported%2A> property returns `true`.
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The operating system does not support visual styles.
-or-
Visual styles are disabled by the user in the operating system.
-or-
Visual styles are not applied to the client area of application windows.</exception>
</Docs>
</Member>
<Member MemberName="IsSupported">
<MemberSignature Language="C#" Value="public static bool IsSupported { get; }" />
<MemberSignature Language="ILAsm" Value=".property bool IsSupported" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.ComboBoxRenderer.IsSupported" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly Property IsSupported As Boolean" />
<MemberSignature Language="F#" Value="static member IsSupported : bool" Usage="System.Windows.Forms.ComboBoxRenderer.IsSupported" />
<MemberSignature Language="C++ CLI" Value="public:
 static property bool IsSupported { bool get(); };" />
<MemberType>Property</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.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether the <see cref="T:System.Windows.Forms.ComboBoxRenderer" /> class can be used to draw a combo box with visual styles.</summary>
<value>
<see langword="true" /> if the user has enabled visual styles in the operating system and visual styles are applied to the client area of application windows; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If this property is `false`, the <xref:System.Windows.Forms.ComboBoxRenderer.DrawTextBox%2A> or <xref:System.Windows.Forms.ComboBoxRenderer.DrawDropDownButton%2A> methods will throw an <xref:System.InvalidOperationException>.
## Examples
The following code example uses the <xref:System.Windows.Forms.ComboBoxRenderer.IsSupported%2A> property to determine whether to use the <xref:System.Windows.Forms.ComboBoxRenderer> methods. This code example is part of a larger example provided for the <xref:System.Windows.Forms.ComboBoxRenderer> class.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxRenderer/cpp/form1.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBoxRenderer/Overview/form1.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxRenderer/VB/form1.vb" id="Snippet2":::
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.Application.VisualStyleState" />
</Docs>
</Member>
</Members>
</Type>