-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
StatusBarPanel.xml
859 lines (777 loc) · 70.7 KB
/
StatusBarPanel.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
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
<Type Name="StatusBarPanel" FullName="System.Windows.Forms.StatusBarPanel">
<TypeSignature Language="C#" Value="public class StatusBarPanel : System.ComponentModel.Component, System.ComponentModel.ISupportInitialize" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit StatusBarPanel extends System.ComponentModel.Component implements class System.ComponentModel.ISupportInitialize" />
<TypeSignature Language="DocId" Value="T:System.Windows.Forms.StatusBarPanel" />
<TypeSignature Language="VB.NET" Value="Public Class StatusBarPanel
Inherits Component
Implements ISupportInitialize" />
<TypeSignature Language="F#" Value="type StatusBarPanel = class
 inherit Component
 interface ISupportInitialize" />
<TypeSignature Language="C++ CLI" Value="public ref class StatusBarPanel : System::ComponentModel::Component, System::ComponentModel::ISupportInitialize" />
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.ComponentModel.Component</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.ComponentModel.ISupportInitialize</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultProperty("Text")]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultProperty("Text")>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DesignTimeVisible(false)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DesignTimeVisible(false)>]</AttributeName>
</Attribute>
<Attribute 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">
<AttributeName Language="C#">[System.ComponentModel.ToolboxItem(false)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.ToolboxItem(false)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Represents a panel in a <see cref="T:System.Windows.Forms.StatusBar" /> control.
This class is not available in .NET 5 and later versions. Use the <see cref="T:System.Windows.Forms.ToolStripStatusLabel" /> control instead, which replaces and extends the <see cref="T:System.Windows.Forms.StatusBarPanel" /> control.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This class is not available in .NET 5 and later versions. Use the <xref:System.Windows.Forms.ToolStripStatusLabel> control instead.
A <xref:System.Windows.Forms.StatusBarPanel> represents an individual panel in the <xref:System.Windows.Forms.StatusBar.StatusBarPanelCollection> of a <xref:System.Windows.Forms.StatusBar> control. A <xref:System.Windows.Forms.StatusBarPanel> can contain text and/or an icon that can be used to reflect the status of an application. Use the <xref:System.Windows.Forms.StatusBar.StatusBarPanelCollection>, accessible through the <xref:System.Windows.Forms.StatusBar.Panels%2A?displayProperty=nameWithType> property of a <xref:System.Windows.Forms.StatusBar> control, to retrieve, add, or remove an individual <xref:System.Windows.Forms.StatusBarPanel>.
The <xref:System.Windows.Forms.StatusBarPanel> provides properties that enable you to modify the display behavior of a panel within a <xref:System.Windows.Forms.StatusBar> control. You can use the <xref:System.Windows.Forms.StatusBarPanel.Icon%2A> property to display an icon within a panel. This property can be used to provide a graphical representation of state in an application. The <xref:System.Windows.Forms.StatusBarPanel.Alignment%2A> property enables you to specify how text and/or an icon is aligned within the panel. To ensure that your panel is sized properly to fit the text of the panel, you can use the <xref:System.Windows.Forms.StatusBarPanel.AutoSize%2A> property to automatically resize the panel to fit the text of the panel or to fill the remaining space within the <xref:System.Windows.Forms.StatusBar> control. The <xref:System.Windows.Forms.StatusBarPanel.MinWidth%2A> property enables you to specify a minimum width for the panel to ensure that it does not get smaller than the data it is intended to display.
The <xref:System.Windows.Forms.StatusBar> control is typically used to display Help information or state information about your application. Often, it is important to display additional information about data that is presented in a panel. You can use the <xref:System.Windows.Forms.StatusBarPanel.ToolTipText%2A> property to display information whenever the mouse pointer rests on a panel.
Although the <xref:System.Windows.Forms.StatusBar> control is typically used to display textual information, you can also provide your own type of display to a <xref:System.Windows.Forms.StatusBarPanel>. The <xref:System.Windows.Forms.StatusBarPanel.Style%2A> property enables you to specify how the <xref:System.Windows.Forms.StatusBarPanel> will be drawn. By default, the <xref:System.Windows.Forms.StatusBarPanel.Style%2A> property is used to display the value of the <xref:System.Windows.Forms.StatusBarPanel.Text%2A> property (and an icon, if specified in the <xref:System.Windows.Forms.StatusBarPanel.Icon%2A> property). If the property is set to <xref:System.Windows.Forms.StatusBarPanelStyle.OwnerDraw>, you can draw your own information into the panel. You can use this feature to draw a progress bar or an animated icon in the panel.
When you create an instance of the <xref:System.Windows.Forms.StatusBarPanel> class, the read/write properties are set to initial values. For a list of these values, see the <xref:System.Windows.Forms.StatusBarPanel.%23ctor%2A> constructor.
## Examples
The following code example creates a <xref:System.Windows.Forms.StatusBar> control on a form and adds two <xref:System.Windows.Forms.StatusBarPanel> objects. The first <xref:System.Windows.Forms.StatusBarPanel>, named `panel1`, displays status text for an application. The second <xref:System.Windows.Forms.StatusBarPanel>, named `panel2`, displays the current date and uses the <xref:System.Windows.Forms.StatusBarPanel.ToolTipText%2A> property of the <xref:System.Windows.Forms.StatusBarPanel> class to display the current time. The example uses the <xref:System.Windows.Forms.StatusBar.ShowPanels%2A> property to ensure that the panels are displayed instead of a standard panel, and it uses the <xref:System.Windows.Forms.StatusBar.Panels%2A> property to access the <xref:System.Windows.Forms.StatusBar.StatusBarPanelCollection.Add%2A> method of the <xref:System.Windows.Forms.StatusBar.StatusBarPanelCollection> to add the panels to the <xref:System.Windows.Forms.StatusBar>. The example also uses the <xref:System.Windows.Forms.StatusBarPanel.AutoSize%2A>, <xref:System.Windows.Forms.StatusBarPanel.BorderStyle%2A>, <xref:System.Windows.Forms.StatusBarPanel.ToolTipText%2A>, and <xref:System.Windows.Forms.StatusBarPanel.Text%2A> properties to initialize the <xref:System.Windows.Forms.StatusBarPanel> objects. This example assumes that the method defined in the example is defined and called from the constructor of a <xref:System.Windows.Forms.Form>.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar+StatusBarPanelCollection/Overview/form1.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/VB/form1.vb" id="Snippet1":::
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.StatusBarPanel" />
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public StatusBarPanel ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.StatusBarPanel.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:
 StatusBarPanel();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Forms.StatusBarPanel" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When you create an instance of <xref:System.Windows.Forms.StatusBarPanel>, the following read/write properties are set to initial values.
|Property|Initial value|
|--------------|-------------------|
|<xref:System.Windows.Forms.StatusBarPanel.Alignment%2A>|<xref:System.Windows.Forms.HorizontalAlignment.Left>|
|<xref:System.Windows.Forms.StatusBarPanel.AutoSize%2A>|<xref:System.Windows.Forms.StatusBarPanelAutoSize.None>|
|<xref:System.Windows.Forms.StatusBarPanel.BorderStyle%2A>|<xref:System.Windows.Forms.StatusBarPanelBorderStyle.Sunken>|
|<xref:System.Windows.Forms.StatusBarPanel.Icon%2A>|`null`|
|<xref:System.Windows.Forms.StatusBarPanel.MinWidth%2A>|10|
|<xref:System.Windows.Forms.StatusBarPanel.Style%2A>|<xref:System.Windows.Forms.StatusBarPanelStyle.Text>|
|<xref:System.Windows.Forms.StatusBarPanel.Text%2A>|A zero-length string.|
|<xref:System.Windows.Forms.StatusBarPanel.ToolTipText%2A>|A zero-length string.|
|<xref:System.Windows.Forms.StatusBarPanel.Width%2A>|100|
You can change the value for any of these properties through a separate call to the property.
## Examples
The following code example creates a <xref:System.Windows.Forms.StatusBar> control on a form and adds two <xref:System.Windows.Forms.StatusBarPanel> objects. The first <xref:System.Windows.Forms.StatusBarPanel>, named `panel1`, displays status text for an application. The second <xref:System.Windows.Forms.StatusBarPanel>, named `panel2`, displays the current date and uses the <xref:System.Windows.Forms.StatusBarPanel.ToolTipText%2A> property of the <xref:System.Windows.Forms.StatusBarPanel> class to display the current time. The example uses the <xref:System.Windows.Forms.StatusBar.ShowPanels%2A> property to ensure that the panels are displayed instead of a standard panel, and it uses the <xref:System.Windows.Forms.StatusBar.Panels%2A> property to access the <xref:System.Windows.Forms.StatusBar.StatusBarPanelCollection.Add%2A> method of the <xref:System.Windows.Forms.StatusBar.StatusBarPanelCollection> to add the panels to the <xref:System.Windows.Forms.StatusBar>. The example also uses the <xref:System.Windows.Forms.StatusBarPanel.AutoSize%2A>, <xref:System.Windows.Forms.StatusBarPanel.BorderStyle%2A>, <xref:System.Windows.Forms.StatusBarPanel.ToolTipText%2A>, and <xref:System.Windows.Forms.StatusBarPanel.Text%2A> properties to initialize the <xref:System.Windows.Forms.StatusBarPanel> objects. This example assumes that the method defined in the example is defined and called from the constructor of a <xref:System.Windows.Forms.Form>.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar+StatusBarPanelCollection/Overview/form1.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/VB/form1.vb" id="Snippet1":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Alignment">
<MemberSignature Language="C#" Value="public System.Windows.Forms.HorizontalAlignment Alignment { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Windows.Forms.HorizontalAlignment Alignment" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.StatusBarPanel.Alignment" />
<MemberSignature Language="VB.NET" Value="Public Property Alignment As HorizontalAlignment" />
<MemberSignature Language="F#" Value="member this.Alignment : System.Windows.Forms.HorizontalAlignment with get, set" Usage="System.Windows.Forms.StatusBarPanel.Alignment" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Windows::Forms::HorizontalAlignment Alignment { System::Windows::Forms::HorizontalAlignment get(); void set(System::Windows::Forms::HorizontalAlignment value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultValue(System.Windows.Forms.HorizontalAlignment.Left)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue(System.Windows.Forms.HorizontalAlignment.Left)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.Localizable(true)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Localizable(true)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Forms.HorizontalAlignment</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the alignment of text and icons within the status bar panel.</summary>
<value>One of the <see cref="T:System.Windows.Forms.HorizontalAlignment" /> values. The default is <see cref="F:System.Windows.Forms.HorizontalAlignment.Left" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You can use this property to horizontally align the text and/or icon assigned to the <xref:System.Windows.Forms.StatusBarPanel.Icon%2A> property within the borders of the panel. Text and icons can be aligned to the left, right, or center of the <xref:System.Windows.Forms.StatusBarPanel>. There is no way to independently position an icon within the <xref:System.Windows.Forms.StatusBarPanel>. For example, you cannot position an icon to the left side of the <xref:System.Windows.Forms.StatusBarPanel> while aligning the text on the right side. The icon is always positioned to the left side of the text regardless of how the text is aligned.
## Examples
The following code example demonstrates how to use the <xref:System.Windows.Forms.StatusBar.SizingGrip%2A?displayProperty=nameWithType>, <xref:System.Windows.Forms.StatusBarPanel.Alignment%2A>, <xref:System.Windows.Forms.StatusBarPanel.Width%2A>, <xref:System.Windows.Forms.StatusBarPanel.AutoSize%2A>, and <xref:System.Windows.Forms.StatusBarPanel.BorderStyle%2A> properties, and how to handle the <xref:System.Windows.Forms.StatusBar.PanelClick?displayProperty=nameWithType> event.
To run the example, paste the following code into a form. Call the `InitializeStatusBarPanels` method in the form's constructor or <xref:System.Windows.Forms.Form.Load> event-handling method.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.StatusBarPanelExample/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar/.ctor/form1.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusBarPanelExample/VB/form1.vb" id="Snippet1":::
]]></format>
</remarks>
<exception cref="T:System.ComponentModel.InvalidEnumArgumentException">The value assigned to the property is not a member of the <see cref="T:System.Windows.Forms.HorizontalAlignment" /> enumeration.</exception>
<altmember cref="T:System.Windows.Forms.HorizontalAlignment" />
<altmember cref="P:System.Windows.Forms.StatusBarPanel.Icon" />
</Docs>
</Member>
<Member MemberName="AutoSize">
<MemberSignature Language="C#" Value="public System.Windows.Forms.StatusBarPanelAutoSize AutoSize { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Windows.Forms.StatusBarPanelAutoSize AutoSize" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.StatusBarPanel.AutoSize" />
<MemberSignature Language="VB.NET" Value="Public Property AutoSize As StatusBarPanelAutoSize" />
<MemberSignature Language="F#" Value="member this.AutoSize : System.Windows.Forms.StatusBarPanelAutoSize with get, set" Usage="System.Windows.Forms.StatusBarPanel.AutoSize" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Windows::Forms::StatusBarPanelAutoSize AutoSize { System::Windows::Forms::StatusBarPanelAutoSize get(); void set(System::Windows::Forms::StatusBarPanelAutoSize value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultValue(System.Windows.Forms.StatusBarPanelAutoSize.None)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue(System.Windows.Forms.StatusBarPanelAutoSize.None)>]</AttributeName>
</Attribute>
<Attribute 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">
<AttributeName Language="C#">[System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.All)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.All)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Forms.StatusBarPanelAutoSize</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether the status bar panel is automatically resized.</summary>
<value>One of the <see cref="T:System.Windows.Forms.StatusBarPanelAutoSize" /> values. The default is <see cref="F:System.Windows.Forms.StatusBarPanelAutoSize.None" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.Windows.Forms.StatusBarPanel> objects set to <xref:System.Windows.Forms.StatusBarPanelAutoSize.Contents> have precedence over those panels set to the <xref:System.Windows.Forms.StatusBarPanelAutoSize.Spring> value. For example, a <xref:System.Windows.Forms.StatusBarPanel> that has its <xref:System.Windows.Forms.StatusBarPanel.AutoSize%2A> property set to <xref:System.Windows.Forms.StatusBarPanelAutoSize.Spring> is shortened if a <xref:System.Windows.Forms.StatusBarPanel> with the <xref:System.Windows.Forms.StatusBarPanel.AutoSize%2A> property set to <xref:System.Windows.Forms.StatusBarPanelAutoSize.Contents> requires that space.
You can use <xref:System.Windows.Forms.StatusBarPanel.AutoSize%2A> to ensure that the contents of a <xref:System.Windows.Forms.StatusBarPanel> are properly displayed in a <xref:System.Windows.Forms.StatusBar> control that contains more than one panel. For example, you might want a panel that contains text to adjust automatically to the amount of text it is displaying (<xref:System.Windows.Forms.StatusBarPanelAutoSize.Contents>), while another panel on the <xref:System.Windows.Forms.StatusBar> that displays an owner-drawn progress bar would need to be a fixed size (<xref:System.Windows.Forms.StatusBarPanelAutoSize.None>).
## Examples
The following code example creates a <xref:System.Windows.Forms.StatusBar> control on a form and adds two <xref:System.Windows.Forms.StatusBarPanel> objects. The first <xref:System.Windows.Forms.StatusBarPanel>, named `panel1`, displays status text for an application. The second <xref:System.Windows.Forms.StatusBarPanel>, named `panel2`, displays the current date and uses the <xref:System.Windows.Forms.StatusBarPanel.ToolTipText%2A> property of the <xref:System.Windows.Forms.StatusBarPanel> class to display the current time. The example uses the <xref:System.Windows.Forms.StatusBar.ShowPanels%2A> property to ensure that the panels are displayed instead of a standard panel, and it uses the <xref:System.Windows.Forms.StatusBar.Panels%2A> property to access the <xref:System.Windows.Forms.StatusBar.StatusBarPanelCollection.Add%2A> method of the <xref:System.Windows.Forms.StatusBar.StatusBarPanelCollection> to add the panels to the <xref:System.Windows.Forms.StatusBar>. The example also uses the <xref:System.Windows.Forms.StatusBarPanel.AutoSize%2A>, <xref:System.Windows.Forms.StatusBarPanel.BorderStyle%2A>, <xref:System.Windows.Forms.StatusBarPanel.ToolTipText%2A>, and <xref:System.Windows.Forms.StatusBarPanel.Text%2A> properties to initialize the <xref:System.Windows.Forms.StatusBarPanel> objects. This example assumes that the method defined in the example is defined and called from the constructor of a <xref:System.Windows.Forms.Form>.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar+StatusBarPanelCollection/Overview/form1.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/VB/form1.vb" id="Snippet1":::
]]></format>
</remarks>
<exception cref="T:System.ComponentModel.InvalidEnumArgumentException">The value assigned to the property is not a member of the <see cref="T:System.Windows.Forms.StatusBarPanelAutoSize" /> enumeration.</exception>
<altmember cref="T:System.Windows.Forms.StatusBarPanelAutoSize" />
</Docs>
</Member>
<Member MemberName="BeginInit">
<MemberSignature Language="C#" Value="public void BeginInit ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void BeginInit() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.StatusBarPanel.BeginInit" />
<MemberSignature Language="VB.NET" Value="Public Sub BeginInit ()" />
<MemberSignature Language="F#" Value="abstract member BeginInit : unit -> unit
override this.BeginInit : unit -> unit" Usage="statusBarPanel.BeginInit " />
<MemberSignature Language="C++ CLI" Value="public:
 virtual void BeginInit();" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.ComponentModel.ISupportInitialize.BeginInit</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Begins the initialization of a <see cref="T:System.Windows.Forms.StatusBarPanel" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method is used to start the initialization of a component that is used on a form or used by another component. The <xref:System.Windows.Forms.StatusBarPanel.EndInit%2A> method ends the initialization. Using the <xref:System.Windows.Forms.StatusBarPanel.BeginInit%2A> and <xref:System.Windows.Forms.StatusBarPanel.EndInit%2A> methods prevents the control from being used before it is fully initialized.
]]></format>
</remarks>
<altmember cref="M:System.Windows.Forms.StatusBarPanel.EndInit" />
</Docs>
</Member>
<Member MemberName="BorderStyle">
<MemberSignature Language="C#" Value="public System.Windows.Forms.StatusBarPanelBorderStyle BorderStyle { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Windows.Forms.StatusBarPanelBorderStyle BorderStyle" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.StatusBarPanel.BorderStyle" />
<MemberSignature Language="VB.NET" Value="Public Property BorderStyle As StatusBarPanelBorderStyle" />
<MemberSignature Language="F#" Value="member this.BorderStyle : System.Windows.Forms.StatusBarPanelBorderStyle with get, set" Usage="System.Windows.Forms.StatusBarPanel.BorderStyle" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Windows::Forms::StatusBarPanelBorderStyle BorderStyle { System::Windows::Forms::StatusBarPanelBorderStyle get(); void set(System::Windows::Forms::StatusBarPanelBorderStyle value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultValue(System.Windows.Forms.StatusBarPanelBorderStyle.Sunken)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue(System.Windows.Forms.StatusBarPanelBorderStyle.Sunken)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Runtime.InteropServices.DispId(-504)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.InteropServices.DispId(-504)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Forms.StatusBarPanelBorderStyle</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the border style of the status bar panel.</summary>
<value>One of the <see cref="T:System.Windows.Forms.StatusBarPanelBorderStyle" /> values. The default is <see cref="F:System.Windows.Forms.StatusBarPanelBorderStyle.Sunken" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You can use this property to differentiate a panel from other panels in a <xref:System.Windows.Forms.StatusBar> control.
## Examples
The following code example creates a <xref:System.Windows.Forms.StatusBar> control on a form and adds two <xref:System.Windows.Forms.StatusBarPanel> objects. The first <xref:System.Windows.Forms.StatusBarPanel>, named `panel1`, displays status text for an application. The second <xref:System.Windows.Forms.StatusBarPanel>, named `panel2`, displays the current date and uses the <xref:System.Windows.Forms.StatusBarPanel.ToolTipText%2A> property of the <xref:System.Windows.Forms.StatusBarPanel> class to display the current time. The example uses the <xref:System.Windows.Forms.StatusBar.ShowPanels%2A> property to ensure that the panels are displayed instead of a standard panel, and it uses the <xref:System.Windows.Forms.StatusBar.Panels%2A> property to access the <xref:System.Windows.Forms.StatusBar.StatusBarPanelCollection.Add%2A> method of the <xref:System.Windows.Forms.StatusBar.StatusBarPanelCollection> to add the panels to the <xref:System.Windows.Forms.StatusBar>. The example also uses the <xref:System.Windows.Forms.StatusBarPanel.AutoSize%2A>, <xref:System.Windows.Forms.StatusBarPanel.BorderStyle%2A>, <xref:System.Windows.Forms.StatusBarPanel.ToolTipText%2A>, and <xref:System.Windows.Forms.StatusBarPanel.Text%2A> properties to initialize the <xref:System.Windows.Forms.StatusBarPanel> objects. This example assumes that the method defined in the example is defined and called from the constructor of a <xref:System.Windows.Forms.Form>.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar+StatusBarPanelCollection/Overview/form1.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/VB/form1.vb" id="Snippet1":::
]]></format>
</remarks>
<exception cref="T:System.ComponentModel.InvalidEnumArgumentException">The value assigned to the property is not a member of the <see cref="T:System.Windows.Forms.StatusBarPanelBorderStyle" /> enumeration.</exception>
<altmember cref="T:System.Windows.Forms.StatusBarPanelBorderStyle" />
</Docs>
</Member>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="protected override void Dispose (bool disposing);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void Dispose(bool disposing) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.StatusBarPanel.Dispose(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Sub Dispose (disposing As Boolean)" />
<MemberSignature Language="F#" Value="override this.Dispose : bool -> unit" Usage="statusBarPanel.Dispose disposing" />
<MemberSignature Language="C++ CLI" Value="protected:
 override void Dispose(bool disposing);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="disposing" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="disposing">
<see langword="true" /> to release both managed and unmanaged resources; <see langword="false" /> to release only unmanaged resources.</param>
<summary>Releases the unmanaged resources used by the <see cref="T:System.Windows.Forms.StatusBarPanel" /> and optionally releases the managed resources.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method is called by the public `Dispose()` method and the <xref:System.Object.Finalize> method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`.
When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this <xref:System.Windows.Forms.StatusBarPanel> references. This method invokes the `Dispose()` method of each referenced object.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>
<see langword="Dispose" /> can be called multiple times by other objects. When overriding <see langword="Dispose(Boolean)" /> be careful not to reference objects that have been previously disposed of in an earlier call to <see langword="Dispose" />. For more information about how to implement <see langword="Dispose(Boolean)" />, see <see href="/dotnet/standard/garbage-collection/implementing-dispose">Implementing a Dispose Method</see>.
For more information about <see langword="Dispose" /> and <see cref="M:System.Object.Finalize" />, see <see href="/dotnet/standard/garbage-collection/unmanaged">Cleaning Up Unmanaged Resources</see> and <see href="https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)">Overriding the Finalize Method</see>.</para>
</block>
</Docs>
</Member>
<Member MemberName="EndInit">
<MemberSignature Language="C#" Value="public void EndInit ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void EndInit() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.StatusBarPanel.EndInit" />
<MemberSignature Language="VB.NET" Value="Public Sub EndInit ()" />
<MemberSignature Language="F#" Value="abstract member EndInit : unit -> unit
override this.EndInit : unit -> unit" Usage="statusBarPanel.EndInit " />
<MemberSignature Language="C++ CLI" Value="public:
 virtual void EndInit();" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.ComponentModel.ISupportInitialize.EndInit</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Ends the initialization of a <see cref="T:System.Windows.Forms.StatusBarPanel" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method is used to end the initialization of a component that is used by another component. The <xref:System.Windows.Forms.StatusBarPanel.BeginInit%2A> method starts the initialization. Using the <xref:System.Windows.Forms.StatusBarPanel.BeginInit%2A> and <xref:System.Windows.Forms.StatusBarPanel.EndInit%2A> methods prevents the control from being used before it is fully initialized.
]]></format>
</remarks>
<altmember cref="M:System.Windows.Forms.StatusBarPanel.BeginInit" />
</Docs>
</Member>
<Member MemberName="Icon">
<MemberSignature Language="C#" Value="public System.Drawing.Icon Icon { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Drawing.Icon Icon" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.StatusBarPanel.Icon" />
<MemberSignature Language="VB.NET" Value="Public Property Icon As Icon" />
<MemberSignature Language="F#" Value="member this.Icon : System.Drawing.Icon with get, set" Usage="System.Windows.Forms.StatusBarPanel.Icon" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Drawing::Icon ^ Icon { System::Drawing::Icon ^ get(); void set(System::Drawing::Icon ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultValue(null)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue(null)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.Localizable(true)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Localizable(true)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Drawing.Icon</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the icon to display within the status bar panel.</summary>
<value>An <see cref="T:System.Drawing.Icon" /> that represents the icon to display in the panel.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You can use this property to display an icon that represents the state of your application or a process within your application. For example, you can display an icon in a <xref:System.Windows.Forms.StatusBarPanel> to indicate whether a file save operation is in progress or complete.
> [!NOTE]
> There is no way to independently position an icon within the <xref:System.Windows.Forms.StatusBarPanel>. For example, you cannot position an icon to the left side of the <xref:System.Windows.Forms.StatusBarPanel> while aligning the text on the right side using the <xref:System.Windows.Forms.StatusBarPanel.Alignment%2A> property. The icon is always positioned to the left side of the panel's text regardless of how the text is aligned.
]]></format>
</remarks>
<altmember cref="T:System.Drawing.Icon" />
<altmember cref="P:System.Windows.Forms.StatusBarPanel.Alignment" />
</Docs>
</Member>
<Member MemberName="MinWidth">
<MemberSignature Language="C#" Value="public int MinWidth { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 MinWidth" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.StatusBarPanel.MinWidth" />
<MemberSignature Language="VB.NET" Value="Public Property MinWidth As Integer" />
<MemberSignature Language="F#" Value="member this.MinWidth : int with get, set" Usage="System.Windows.Forms.StatusBarPanel.MinWidth" />
<MemberSignature Language="C++ CLI" Value="public:
 property int MinWidth { int get(); void set(int value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultValue(10)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue(10)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.Localizable(true)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Localizable(true)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.All)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.All)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the minimum allowed width of the status bar panel within the <see cref="T:System.Windows.Forms.StatusBar" /> control.</summary>
<value>The minimum width, in pixels, of the <see cref="T:System.Windows.Forms.StatusBarPanel" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.StatusBarPanel.MinWidth%2A> property is used when the <xref:System.Windows.Forms.StatusBarPanel.AutoSize%2A> property is set to <xref:System.Windows.Forms.StatusBarPanelAutoSize.Contents> or <xref:System.Windows.Forms.StatusBarPanelAutoSize.Spring> to prevent the <xref:System.Windows.Forms.StatusBarPanel> from automatically resizing to a width that is too small. When the <xref:System.Windows.Forms.StatusBarPanel.AutoSize%2A> property is set to <xref:System.Windows.Forms.StatusBarPanelAutoSize.None>, the <xref:System.Windows.Forms.StatusBarPanel.MinWidth%2A> property is automatically set to the same value as the <xref:System.Windows.Forms.StatusBarPanel.Width%2A> property.
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">A value less than 0 is assigned to the property.</exception>
<altmember cref="P:System.Windows.Forms.StatusBarPanel.AutoSize" />
<altmember cref="T:System.Windows.Forms.StatusBarPanelAutoSize" />
</Docs>
</Member>
<Member MemberName="Name">
<MemberSignature Language="C#" Value="public string Name { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Name" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.StatusBarPanel.Name" />
<MemberSignature Language="VB.NET" Value="Public Property Name As String" />
<MemberSignature Language="F#" Value="member this.Name : string with get, set" Usage="System.Windows.Forms.StatusBarPanel.Name" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ Name { System::String ^ get(); void set(System::String ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute 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">
<AttributeName Language="C#">[System.ComponentModel.Localizable(true)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Localizable(true)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the name to apply to the <see cref="T:System.Windows.Forms.StatusBarPanel" />.</summary>
<value>The name of the <see cref="T:System.Windows.Forms.StatusBarPanel" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.StatusBarPanel.Name%2A> property corresponds to the key for a <xref:System.Windows.Forms.StatusBarPanel> in the <xref:System.Windows.Forms.StatusBar.StatusBarPanelCollection>.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Parent">
<MemberSignature Language="C#" Value="public System.Windows.Forms.StatusBar Parent { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Windows.Forms.StatusBar Parent" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.StatusBarPanel.Parent" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Parent As StatusBar" />
<MemberSignature Language="F#" Value="member this.Parent : System.Windows.Forms.StatusBar" Usage="System.Windows.Forms.StatusBarPanel.Parent" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Windows::Forms::StatusBar ^ Parent { System::Windows::Forms::StatusBar ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.Browsable(false)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Browsable(false)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Forms.StatusBar</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the <see cref="T:System.Windows.Forms.StatusBar" /> control that hosts the status bar panel.</summary>
<value>The <see cref="T:System.Windows.Forms.StatusBar" /> that contains the panel.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You can use this property to determine the <xref:System.Windows.Forms.StatusBar> control that a <xref:System.Windows.Forms.StatusBarPanel> is contained within. <xref:System.Windows.Forms.StatusBarPanel> objects are added to a <xref:System.Windows.Forms.StatusBar> control by calling the <xref:System.Windows.Forms.StatusBar.StatusBarPanelCollection.Add%2A> method of the <xref:System.Windows.Forms.StatusBar.StatusBarPanelCollection> class. The <xref:System.Windows.Forms.StatusBar.StatusBarPanelCollection> of a <xref:System.Windows.Forms.StatusBar> control is accessible through the <xref:System.Windows.Forms.StatusBar.Panels%2A> property.
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.StatusBar" />
<altmember cref="T:System.Windows.Forms.StatusBar.StatusBarPanelCollection" />
</Docs>
</Member>
<Member MemberName="Style">
<MemberSignature Language="C#" Value="public System.Windows.Forms.StatusBarPanelStyle Style { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Windows.Forms.StatusBarPanelStyle Style" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.StatusBarPanel.Style" />
<MemberSignature Language="VB.NET" Value="Public Property Style As StatusBarPanelStyle" />
<MemberSignature Language="F#" Value="member this.Style : System.Windows.Forms.StatusBarPanelStyle with get, set" Usage="System.Windows.Forms.StatusBarPanel.Style" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Windows::Forms::StatusBarPanelStyle Style { System::Windows::Forms::StatusBarPanelStyle get(); void set(System::Windows::Forms::StatusBarPanelStyle value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultValue(System.Windows.Forms.StatusBarPanelStyle.Text)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue(System.Windows.Forms.StatusBarPanelStyle.Text)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Forms.StatusBarPanelStyle</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the style of the status bar panel.</summary>
<value>One of the <see cref="T:System.Windows.Forms.StatusBarPanelStyle" /> values. The default is <see cref="F:System.Windows.Forms.StatusBarPanelStyle.Text" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You can use this property to indicate whether a <xref:System.Windows.Forms.StatusBarPanel> displays text or whether the panel is managed as an owner-drawn <xref:System.Windows.Forms.StatusBarPanel>. To determine when a <xref:System.Windows.Forms.StatusBarPanel> needs to be drawn, create an event handler for the <xref:System.Windows.Forms.StatusBar.DrawItem> event of the <xref:System.Windows.Forms.StatusBar> control. The <xref:System.Windows.Forms.StatusBarDrawItemEventArgs> passed as a parameter to an event handler of the <xref:System.Windows.Forms.StatusBar.DrawItem> event enables you to determine which panel needs to be drawn. The <xref:System.Windows.Forms.StatusBarDrawItemEventArgs> also provides a <xref:System.Drawing.Graphics> object you can use to perform drawing tasks on the <xref:System.Windows.Forms.StatusBarPanel>.
## Examples
The following code example demonstrates how to use the <xref:System.Windows.Forms.StatusBarPanel.Style%2A> property, <xref:System.Windows.Forms.StatusBarDrawItemEventHandler> delegate, <xref:System.Windows.Forms.StatusBarDrawItemEventArgs> class, <xref:System.Windows.Forms.StatusBarPanelStyle> enumeration, and <xref:System.Windows.Forms.StatusBarDrawItemEventArgs.Panel%2A?displayProperty=nameWithType> property. To run the example, paste the following code into a form. Call the `InitializeStatusBarPanels` method in the form's constructor or <xref:System.Windows.Forms.Form.Load> event-method.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.StatusBarDrawItemEventHandler/CPP/form1.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar/Text/form1.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusBarDrawItemEventHandler/VB/form1.vb" id="Snippet2":::
]]></format>
</remarks>
<exception cref="T:System.ComponentModel.InvalidEnumArgumentException">The value assigned to the property is not a member of the <see cref="T:System.Windows.Forms.StatusBarPanelStyle" /> enumeration.</exception>
<altmember cref="T:System.Windows.Forms.StatusBarPanelStyle" />
</Docs>
</Member>
<Member MemberName="Tag">
<MemberSignature Language="C#" Value="public object Tag { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance object Tag" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.StatusBarPanel.Tag" />
<MemberSignature Language="VB.NET" Value="Public Property Tag As Object" />
<MemberSignature Language="F#" Value="member this.Tag : obj with get, set" Usage="System.Windows.Forms.StatusBarPanel.Tag" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Object ^ Tag { System::Object ^ get(); void set(System::Object ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute 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">
<AttributeName Language="C#">[System.ComponentModel.Bindable(true)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Bindable(true)>]</AttributeName>
</Attribute>
<Attribute 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">
<AttributeName Language="C#">[System.ComponentModel.DefaultValue(null)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue(null)>]</AttributeName>
</Attribute>
<Attribute 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">
<AttributeName Language="C#">[System.ComponentModel.Localizable(false)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Localizable(false)>]</AttributeName>
</Attribute>
<Attribute 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">
<AttributeName Language="C#">[System.ComponentModel.TypeConverter(typeof(System.ComponentModel.StringConverter))]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.TypeConverter(typeof(System.ComponentModel.StringConverter))>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets an object that contains data about the <see cref="T:System.Windows.Forms.StatusBarPanel" />.</summary>
<value>The <see cref="T:System.Object" /> that contains data about the <see cref="T:System.Windows.Forms.StatusBarPanel" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Text">
<MemberSignature Language="C#" Value="public string Text { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Text" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.StatusBarPanel.Text" />
<MemberSignature Language="VB.NET" Value="Public Property Text As String" />
<MemberSignature Language="F#" Value="member this.Text : string with get, set" Usage="System.Windows.Forms.StatusBarPanel.Text" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ Text { System::String ^ get(); void set(System::String ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultValue("")]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue("")>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.Localizable(true)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Localizable(true)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the text of the status bar panel.</summary>
<value>The text displayed in the panel.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property represents the text that is displayed when the <xref:System.Windows.Forms.StatusBarPanel.Style%2A> property is set to <xref:System.Windows.Forms.StatusBarPanelStyle.Text>. You can use this property to display information about your application in a <xref:System.Windows.Forms.StatusBar> control. For example, you can use the <xref:System.Windows.Forms.StatusBarPanel.Text%2A> property to display Help information when the user moves the mouse over a menu or to display the name and location of a file that is opened in an application. To align the text within a <xref:System.Windows.Forms.StatusBarPanel>, use the <xref:System.Windows.Forms.StatusBarPanel.Alignment%2A> property.
## Examples
The following code example creates a <xref:System.Windows.Forms.StatusBar> control on a form and adds two <xref:System.Windows.Forms.StatusBarPanel> objects. The first <xref:System.Windows.Forms.StatusBarPanel>, named `panel1`, displays status text for an application. The second <xref:System.Windows.Forms.StatusBarPanel>, named `panel2`, displays the current date and uses the <xref:System.Windows.Forms.StatusBarPanel.ToolTipText%2A> property of the <xref:System.Windows.Forms.StatusBarPanel> class to display the current time. The example uses the <xref:System.Windows.Forms.StatusBar.ShowPanels%2A> property to ensure that the panels are displayed instead of a standard panel, and it uses the <xref:System.Windows.Forms.StatusBar.Panels%2A> property to access the <xref:System.Windows.Forms.StatusBar.StatusBarPanelCollection.Add%2A> method of the <xref:System.Windows.Forms.StatusBar.StatusBarPanelCollection> to add the panels to the <xref:System.Windows.Forms.StatusBar>. The example also uses the <xref:System.Windows.Forms.StatusBarPanel.AutoSize%2A>, <xref:System.Windows.Forms.StatusBarPanel.BorderStyle%2A>, <xref:System.Windows.Forms.StatusBarPanel.ToolTipText%2A>, and <xref:System.Windows.Forms.StatusBarPanel.Text%2A> properties to initialize the <xref:System.Windows.Forms.StatusBarPanel> objects. This example assumes that the method defined in the example is defined and called from the constructor of a <xref:System.Windows.Forms.Form>.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar+StatusBarPanelCollection/Overview/form1.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/VB/form1.vb" id="Snippet1":::
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.StatusBarPanel.Alignment" />
</Docs>
</Member>
<Member MemberName="ToolTipText">
<MemberSignature Language="C#" Value="public string ToolTipText { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string ToolTipText" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.StatusBarPanel.ToolTipText" />
<MemberSignature Language="VB.NET" Value="Public Property ToolTipText As String" />
<MemberSignature Language="F#" Value="member this.ToolTipText : string with get, set" Usage="System.Windows.Forms.StatusBarPanel.ToolTipText" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ ToolTipText { System::String ^ get(); void set(System::String ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultValue("")]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue("")>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.Localizable(true)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Localizable(true)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets ToolTip text associated with the status bar panel.</summary>
<value>The ToolTip text for the panel.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You can use this property to display additional information in a ToolTip when the mouse pointer rests on a <xref:System.Windows.Forms.StatusBarPanel>. For example, you can display a ToolTip that provides data transfer speed for a <xref:System.Windows.Forms.StatusBarPanel> that displays the status of a file transfer.
To display ToolTips for other controls in your application, use the <xref:System.Windows.Forms.ToolTip> control.
## Examples
The following code example creates a <xref:System.Windows.Forms.StatusBar> control on a form and adds two <xref:System.Windows.Forms.StatusBarPanel> objects. The first <xref:System.Windows.Forms.StatusBarPanel>, named `panel1`, displays status text for an application. The second <xref:System.Windows.Forms.StatusBarPanel>, named `panel2`, displays the current date and uses the <xref:System.Windows.Forms.StatusBarPanel.ToolTipText%2A> property of the <xref:System.Windows.Forms.StatusBarPanel> class to display the current time. The example uses the <xref:System.Windows.Forms.StatusBar.ShowPanels%2A> property to ensure that the panels are displayed instead of a standard panel, and it uses the <xref:System.Windows.Forms.StatusBar.Panels%2A> property to access the <xref:System.Windows.Forms.StatusBar.StatusBarPanelCollection.Add%2A> method of the <xref:System.Windows.Forms.StatusBar.StatusBarPanelCollection> to add the panels to the <xref:System.Windows.Forms.StatusBar>. The example also uses the <xref:System.Windows.Forms.StatusBarPanel.AutoSize%2A>, <xref:System.Windows.Forms.StatusBarPanel.BorderStyle%2A>, <xref:System.Windows.Forms.StatusBarPanel.ToolTipText%2A>, and <xref:System.Windows.Forms.StatusBarPanel.Text%2A> properties to initialize the <xref:System.Windows.Forms.StatusBarPanel> objects. This example assumes that the method defined in the example is defined and called from the constructor of a <xref:System.Windows.Forms.Form>.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar+StatusBarPanelCollection/Overview/form1.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/VB/form1.vb" id="Snippet1":::
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.ToolTip" />
</Docs>
</Member>
<Member MemberName="ToString">
<MemberSignature Language="C#" Value="public override string ToString ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string ToString() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.StatusBarPanel.ToString" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function ToString () As String" />
<MemberSignature Language="F#" Value="override this.ToString : unit -> string" Usage="statusBarPanel.ToString " />
<MemberSignature Language="C++ CLI" Value="public:
 override System::String ^ ToString();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Retrieves a string that contains information about the panel.</summary>
<returns>Returns a string that contains the class name for the control and the text it contains.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Width">
<MemberSignature Language="C#" Value="public int Width { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 Width" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.StatusBarPanel.Width" />
<MemberSignature Language="VB.NET" Value="Public Property Width As Integer" />
<MemberSignature Language="F#" Value="member this.Width : int with get, set" Usage="System.Windows.Forms.StatusBarPanel.Width" />
<MemberSignature Language="C++ CLI" Value="public:
 property int Width { int get(); void set(int value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultValue(100)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue(100)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.Localizable(true)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Localizable(true)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the width of the status bar panel within the <see cref="T:System.Windows.Forms.StatusBar" /> control.</summary>
<value>The width, in pixels, of the <see cref="T:System.Windows.Forms.StatusBarPanel" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.StatusBarPanel.Width%2A> property always reflects the actual width of a <xref:System.Windows.Forms.StatusBarPanel> and cannot be smaller than the <xref:System.Windows.Forms.StatusBarPanel.MinWidth%2A> property. To automatically resize the width of the <xref:System.Windows.Forms.StatusBarPanel> to the contents of the <xref:System.Windows.Forms.StatusBarPanel>, you can use the <xref:System.Windows.Forms.StatusBarPanel.AutoSize%2A> property.
## Examples
The following code example demonstrates how to use the <xref:System.Windows.Forms.StatusBar.SizingGrip%2A?displayProperty=nameWithType>, <xref:System.Windows.Forms.StatusBarPanel.Alignment%2A>, <xref:System.Windows.Forms.StatusBarPanel.Width%2A>, <xref:System.Windows.Forms.StatusBarPanel.AutoSize%2A>, and <xref:System.Windows.Forms.StatusBarPanel.BorderStyle%2A> properties, and how to handle the <xref:System.Windows.Forms.StatusBar.PanelClick?displayProperty=nameWithType> event.
To run the example, paste the following code into a form. Call the `InitializeStatusBarPanels` method in the form's constructor or <xref:System.Windows.Forms.Form.Load> event-handling method.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.StatusBarPanelExample/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar/.ctor/form1.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusBarPanelExample/VB/form1.vb" id="Snippet1":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">The width specified is less than the value of the <see cref="P:System.Windows.Forms.StatusBarPanel.MinWidth" /> property.</exception>
<altmember cref="P:System.Windows.Forms.StatusBarPanel.MinWidth" />
<altmember cref="P:System.Windows.Forms.StatusBarPanel.AutoSize" />
</Docs>
</Member>
</Members>
</Type>