/
WebPartZoneBase.xml
2935 lines (2591 loc) · 247 KB
/
WebPartZoneBase.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
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<Type Name="WebPartZoneBase" FullName="System.Web.UI.WebControls.WebParts.WebPartZoneBase">
<TypeSignature Language="C#" Value="public abstract class WebPartZoneBase : System.Web.UI.WebControls.WebParts.WebZone, System.Web.UI.IPostBackEventHandler" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract beforefieldinit WebPartZoneBase extends System.Web.UI.WebControls.WebParts.WebZone implements class System.Web.UI.IPostBackEventHandler" />
<TypeSignature Language="DocId" Value="T:System.Web.UI.WebControls.WebParts.WebPartZoneBase" />
<TypeSignature Language="VB.NET" Value="Public MustInherit Class WebPartZoneBase
Inherits WebZone
Implements IPostBackEventHandler" />
<TypeSignature Language="F#" Value="type WebPartZoneBase = class
 inherit WebZone
 interface IPostBackEventHandler" />
<TypeSignature Language="C++ CLI" Value="public ref class WebPartZoneBase abstract : System::Web::UI::WebControls::WebParts::WebZone, System::Web::UI::IPostBackEventHandler" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Web.UI.WebControls.WebParts.WebZone</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.Web.UI.IPostBackEventHandler</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName Language="C#">[System.ComponentModel.Designer("System.Web.UI.Design.WebControls.WebParts.WebPartZoneBaseDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Designer("System.Web.UI.Design.WebControls.WebParts.WebPartZoneBaseDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="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">
<AttributeName Language="C#">[System.ComponentModel.Designer("System.Web.UI.Design.WebControls.WebParts.WebPartZoneBaseDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Designer("System.Web.UI.Design.WebControls.WebParts.WebPartZoneBaseDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Serves as the base class for all zone controls that act as containers for <see cref="T:System.Web.UI.WebControls.WebParts.WebPart" /> (or other server or user) controls.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
In the Web Parts control set, a zone is a composite control, rendered as an HTML table, that contains other controls in a defined region of a Web page. The <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> class is a zone that inherits from the base <xref:System.Web.UI.WebControls.WebParts.WebZone> class and provides a base set of behaviors for derived zones that contain <xref:System.Web.UI.WebControls.WebParts.WebPart> controls, server controls, and user controls. The combination of <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> zones with <xref:System.Web.UI.WebControls.WebParts.WebPart> (and other server) controls forms the primary UI of a Web Parts application, the normal view of a page that users interact with most of the time.
All zones provide a common set of UI elements for the controls they contain. For a detailed discussion of the UI elements common to all zones, see the class overview topic for the <xref:System.Web.UI.WebControls.WebParts.WebZone> class. The <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> zone includes a body section that contains server controls, and an associated <xref:System.Web.UI.WebControls.WebParts.WebPartChrome> object used for rendering the contained controls and their chrome elements, such as their verbs, borders, and so on.
In addition to the features inherited from the <xref:System.Web.UI.WebControls.WebParts.WebZone> class, the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> class adds client-side control dragging, specific verbs (to enable common UI actions such as minimizing, closing, deleting, and editing controls), and additional style features. The <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> class is also the class to inherit from if you want to design a custom zone that is database-driven. For example, you could create a custom weather Web Parts zone that inherits from <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase>, and is designed to contain and provide layout features and other services for <xref:System.Web.UI.WebControls.WebParts.WebPart> controls that are data-bound and display weather information.
The <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> class contains a number of properties for working with style attributes in a zone. There are several properties for borders, including <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.BorderStyle%2A> and <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.BorderWidth%2A>. There is a group of properties for working with style attributes of menus that can appear in the header of a zone, such as <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.MenuLabelStyle%2A>, <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.MenuVerbStyle%2A>, and others.
The <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> class also contains a number of members for handling verbs in a zone. These members relate to the verbs that appear on the part controls in the zone. While zone-level verbs can be added to <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> zones, by default they do not have any. There is a set of standard verbs provided with the Web Parts control set for use with part controls, and developers can add custom verbs as well. Some important properties for working with verbs include properties that reference some of the standard verb objects, such as <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.CloseVerb%2A>, <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.ConnectVerb%2A>, <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.DeleteVerb%2A>, and <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.EditVerb%2A>, <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.HelpVerb%2A>, and <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.MinimizeVerb%2A>. The standard verbs appear on a verbs menu (typically presented in the UI as a drop-down menu) in the title bar of each control contained in a zone. There is also a <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.VerbButtonType%2A> property that allows you to determine what type of clickable object represents a verb in the UI.
Other key members for working with verbs include the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.OnCreateVerbs%2A> method, which is an event handler that can be overridden for custom handling of the verb creation process, and the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.CreateVerbs> event.
The <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> class contains a number of members for working with <xref:System.Web.UI.WebControls.WebParts.WebPart> controls contained within a zone. The <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.WebParts%2A> property references the collection of all <xref:System.Web.UI.WebControls.WebParts.WebPart> (and other server) controls in the zone. Several methods correspond to the standard verbs or actions that a user can carry out on <xref:System.Web.UI.WebControls.WebParts.WebPart> controls in a zone, such as <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.CloseWebPart%2A>, <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.ConnectWebPart%2A>, and <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.EditWebPart%2A>.
There are also a number of members in the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> class that concern how the <xref:System.Web.UI.WebControls.WebParts.WebPart> controls are laid out or arranged within the zone. The <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.AllowLayoutChange%2A> property determines whether controls can be moved among zones or rearranged within a zone by users. The <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.LayoutOrientation%2A> property allows you to determine whether the controls in a zone are arranged horizontally or vertically.
> [!NOTE]
> Internet Explorer might render the height of a <xref:System.Web.UI.WebControls.WebParts.WebPartZone> or its contained controls in an unexpected way, depending on the orientation of the zone. For more details, see the documentation for the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.LayoutOrientation%2A> or the <xref:System.Web.UI.WebControls.WebParts.WebPart.Height%2A> properties.
Other methods in the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> class provide you with detailed programmatic control over the rendering of the various areas of a zone. Many of these methods override the base methods inherited from the <xref:System.Web.UI.WebControls.WebParts.WebZone> class, to customize the rendering for zones that contain <xref:System.Web.UI.WebControls.WebParts.WebPart> controls. Important methods include <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.Render%2A>, <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.RenderBody%2A>, <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.RenderDropCue%2A>, and <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.RenderHeader%2A>.
## Examples
The following code example demonstrates the use of the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> class. The code shows how a derived class, <xref:System.Web.UI.WebControls.WebParts.WebPartZone>, is used declaratively in a Web Parts page to contain <xref:System.Web.UI.WebControls.WebParts.WebPart> controls. The code example has four sections: the first three sections describe the code files, and the fourth explains how to run the code.
The first part of the code example is a user control that enables users to switch the page into different display modes. For more information on Web Parts display modes and a description of the code in this control, see [Walkthrough: Changing Display Modes on a Web Parts Page](https://msdn.microsoft.com/library/24e42f74-82dc-4c13-8574-130398985fc0).
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Overview/CS/displaymodemenucs.ascx" id="Snippet10":::
:::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Overview/VB/displaymodemenuvb.ascx" id="Snippet10":::
The second part of the code example is a code-beside file that contains the code to handle events for the main Web page. The code in this file shows how to work with some of the key <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> members programmatically.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Overview/CS/webpartzonebase_overview.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Overview/VB/webpartzonebase_overview.vb" id="Snippet4":::
The third part of the code example is the Web page that contains the <xref:System.Web.UI.WebControls.WebParts.WebPartZone> controls that exhibit behavior from the base <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> class, and <xref:System.Web.UI.WebControls.WebParts.WebPart> controls contained in the zones.
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Overview/CS/webpartzonebase_overview_cs.aspx" id="Snippet1":::
:::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Overview/VB/webpartzonebase_overview_vb.aspx" id="Snippet1":::
Load the Web page in a browser. Use the **Display Mode** drop-down list control to switch the page into design mode, click the <xref:System.Web.UI.WebControls.WebParts.WebPart> controls, and try dragging them between the visible zones. Click some of the buttons on the page to see the effect of using various members of the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> class. Next, switch the page to edit mode. Make sure a <xref:System.Web.UI.WebControls.WebParts.WebPart> control is positioned in `WebPartZone2`, click the verbs menu on the control's title bar, and click **Edit** to edit the control. Finish editing that control, and then edit one of the controls in the other zone. As you carry out these steps, notice the differences in the UI styles of the controls and the zones, which are the effect of using the various members of the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> class.
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.WebParts.WebPart" />
<altmember cref="T:System.Web.UI.WebControls.WebParts.ToolZone" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected WebPartZoneBase ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.WebPartZoneBase.#ctor" />
<MemberSignature Language="VB.NET" Value="Protected Sub New ()" />
<MemberSignature Language="C++ CLI" Value="protected:
 WebPartZoneBase();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.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>
</Attributes>
<Parameters />
<Docs>
<summary>Initializes the class for use by an inherited class instance. This constructor can only be called by an inherited class.</summary>
<remarks>To be added.</remarks>
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="AllowLayoutChange">
<MemberSignature Language="C#" Value="public virtual bool AllowLayoutChange { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool AllowLayoutChange" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.WebParts.WebPartZoneBase.AllowLayoutChange" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property AllowLayoutChange As Boolean" />
<MemberSignature Language="F#" Value="member this.AllowLayoutChange : bool with get, set" Usage="System.Web.UI.WebControls.WebParts.WebPartZoneBase.AllowLayoutChange" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property bool AllowLayoutChange { bool get(); void set(bool value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultValue(true)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue(true)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Web.UI.Themeable(false)]</AttributeName>
<AttributeName Language="F#">[<System.Web.UI.Themeable(false)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value that indicates whether the layout of <see cref="T:System.Web.UI.WebControls.WebParts.WebPart" /> controls can be changed within a zone.</summary>
<value>
<see langword="true" /> if the layout can be changed; otherwise, <see langword="false" />. The default is <see langword="true" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.AllowLayoutChange%2A> property takes effect only when a zone is in a page display mode in which the layout of controls in the zone can be changed, such as <xref:System.Web.UI.WebControls.WebParts.WebPartManager.DesignDisplayMode>.
When <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.AllowLayoutChange%2A> is set to `false` on a given zone, there are a number of actions that end users are prevented from carrying out on controls in the zone:
- Users cannot drag controls to a different zone, rearrange controls within the zone, or move controls into the zone.
- A number of properties that affect the user interface (UI) of <xref:System.Web.UI.WebControls.WebParts.WebPart> controls in the zone are disabled so that users cannot edit those properties while the control is being edited using the <xref:System.Web.UI.WebControls.WebParts.AppearanceEditorPart> and <xref:System.Web.UI.WebControls.WebParts.BehaviorEditorPart> controls.
- Users cannot add new controls to the zone from a <xref:System.Web.UI.WebControls.WebParts.CatalogPart> control.
- The close, delete, minimize, and restore verbs are not shown on controls in the zone.
Although the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.AllowLayoutChange%2A> property affects end users' ability to change the layout of a zone through the UI, it does not affect the ability to change the layout programmatically. For example, if <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.AllowLayoutChange%2A> is set to `false`, users cannot close controls in the zone, but a developer could still call the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.CloseWebPart%2A> method to close controls programmatically.
This property cannot be set by themes or style sheet themes. For more information, see <xref:System.Web.UI.ThemeableAttribute> and [ASP.NET Themes and Skins](https://docs.microsoft.com/previous-versions/aspnet/ykzx33wh(v=vs.100)).
## Examples
The following code example demonstrates the declarative use of the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.AllowLayoutChange%2A> property on a <xref:System.Web.UI.WebControls.WebParts.WebPartZone> control. For the full code example, including the code-behind source file and the .aspx page that contains the zone in this code, see the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> class overview.
Notice that the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.AllowLayoutChange%2A> property is set to `true`, which is the default. If you change the value to `false`, after you load the page into a browser and switch the page into design display mode, you will not be able to drag controls within or into the `WebPartZone2` zone.
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Overview/CS/webpartzonebase_overview_cs.aspx" id="Snippet3":::
:::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Overview/VB/webpartzonebase_overview_vb.aspx" id="Snippet3":::
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.WebParts.WebPart.AllowZoneChange" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="BorderColor">
<MemberSignature Language="C#" Value="public override System.Drawing.Color BorderColor { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Drawing.Color BorderColor" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.WebParts.WebPartZoneBase.BorderColor" />
<MemberSignature Language="VB.NET" Value="Public Overrides Property BorderColor As Color" />
<MemberSignature Language="F#" Value="member this.BorderColor : System.Drawing.Color with get, set" Usage="System.Web.UI.WebControls.WebParts.WebPartZoneBase.BorderColor" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property System::Drawing::Color BorderColor { System::Drawing::Color get(); void set(System::Drawing::Color value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultValue(typeof(System.Drawing.Color), "Gray")]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue(typeof(System.Drawing.Color), "Gray")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Drawing.Color</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the color for the border of a <see cref="T:System.Web.UI.WebControls.WebParts.WebPartZoneBase" /> control.</summary>
<value>A <see cref="T:System.Drawing.Color" /> that contains the border color. The default color is <see cref="P:System.Drawing.Color.Gray" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The base <xref:System.Web.UI.WebControls.WebControl.BorderColor%2A> property is overridden by the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> class to set a default color for zone borders.
You can set the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.BorderColor%2A> property for a <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> control either declaratively or programmatically. The border appears only when the zone is in a page display mode in which <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> class user interface (UI) features are visible, such as <xref:System.Web.UI.WebControls.WebParts.WebPartManager.EditDisplayMode> or <xref:System.Web.UI.WebControls.WebParts.WebPartManager.DesignDisplayMode>.
## Examples
The following code example demonstrates the declarative use of the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.BorderColor%2A> property on a <xref:System.Web.UI.WebControls.WebParts.WebPartZone> control. For the full code example, including the code-behind source file and the .aspx page that contains the zone in this code, see the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> class overview.
Notice that the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.BorderColor%2A> attribute is set to a specific named color. After you load the page into a browser and switch the page into design display mode, you can see the effect of the property.
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Overview/CS/webpartzonebase_overview_cs.aspx" id="Snippet3":::
:::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Overview/VB/webpartzonebase_overview_vb.aspx" id="Snippet3":::
]]></format>
</remarks>
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="BorderStyle">
<MemberSignature Language="C#" Value="public override System.Web.UI.WebControls.BorderStyle BorderStyle { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Web.UI.WebControls.BorderStyle BorderStyle" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.WebParts.WebPartZoneBase.BorderStyle" />
<MemberSignature Language="VB.NET" Value="Public Overrides Property BorderStyle As BorderStyle" />
<MemberSignature Language="F#" Value="member this.BorderStyle : System.Web.UI.WebControls.BorderStyle with get, set" Usage="System.Web.UI.WebControls.WebParts.WebPartZoneBase.BorderStyle" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property System::Web::UI::WebControls::BorderStyle BorderStyle { System::Web::UI::WebControls::BorderStyle get(); void set(System::Web::UI::WebControls::BorderStyle value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultValue(System.Web.UI.WebControls.BorderStyle.Solid)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue(System.Web.UI.WebControls.BorderStyle.Solid)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.BorderStyle</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the kind of border that surrounds a <see cref="T:System.Web.UI.WebControls.WebParts.WebPartZoneBase" /> control.</summary>
<value>A <see cref="T:System.Web.UI.WebControls.BorderStyle" /> object that contains the kind of border. The default is <see cref="F:System.Web.UI.WebControls.BorderStyle.Solid" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The base <xref:System.Web.UI.WebControls.WebControl.BorderStyle%2A> property is overridden by the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> class to set the default border style for zones.
You can set the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.BorderStyle%2A> property for a <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> control either declaratively or programmatically. The border appears only when the zone is in a page display mode in which <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> class user interface (UI) features are visible, such as <xref:System.Web.UI.WebControls.WebParts.WebPartManager.EditDisplayMode> or <xref:System.Web.UI.WebControls.WebParts.WebPartManager.DesignDisplayMode>.
## Examples
The following code example demonstrates the declarative use of the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.BorderStyle%2A> property on a <xref:System.Web.UI.WebControls.WebParts.WebPartZone> control. For the full code example, including the code-behind source file and the .aspx page that contains the zone in this code, see the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> class overview.
Notice that the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.BorderStyle%2A> attribute is set to a specific kind of border. After you load the page into a browser and switch the page into design display mode, you can see the effect of the property.
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Overview/CS/webpartzonebase_overview_cs.aspx" id="Snippet3":::
:::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Overview/VB/webpartzonebase_overview_vb.aspx" id="Snippet3":::
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.BorderStyle" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="BorderWidth">
<MemberSignature Language="C#" Value="public override System.Web.UI.WebControls.Unit BorderWidth { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Web.UI.WebControls.Unit BorderWidth" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.WebParts.WebPartZoneBase.BorderWidth" />
<MemberSignature Language="VB.NET" Value="Public Overrides Property BorderWidth As Unit" />
<MemberSignature Language="F#" Value="member this.BorderWidth : System.Web.UI.WebControls.Unit with get, set" Usage="System.Web.UI.WebControls.WebParts.WebPartZoneBase.BorderWidth" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property System::Web::UI::WebControls::Unit BorderWidth { System::Web::UI::WebControls::Unit get(); void set(System::Web::UI::WebControls::Unit value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultValue(typeof(System.Web.UI.WebControls.Unit), "1")]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue(typeof(System.Web.UI.WebControls.Unit), "1")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.Unit</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the width of the border that surrounds a <see cref="T:System.Web.UI.WebControls.WebParts.WebPartZoneBase" /> control.</summary>
<value>The width in the specified <see cref="T:System.Web.UI.WebControls.Unit" /> of the border that surrounds a zone. The default is 1.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The base <xref:System.Web.UI.WebControls.WebControl.BorderWidth%2A> property is overridden by the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> class to set the default border width for zones.
You can set the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.BorderWidth%2A> property for a <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> control either declaratively or programmatically. The border appears only when the zone is in a page display mode in which <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> class user interface (UI) features are visible, such as <xref:System.Web.UI.WebControls.WebParts.WebPartManager.EditDisplayMode> or <xref:System.Web.UI.WebControls.WebParts.WebPartManager.DesignDisplayMode>.
## Examples
The following code example demonstrates the declarative use of the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.BorderWidth%2A> property on a <xref:System.Web.UI.WebControls.WebParts.WebPartZone> control. For the full code example, including the code-behind source file and the .aspx page that contains the zone in this code, see the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> class overview.
Notice that the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.BorderWidth%2A> attribute value is set to a specific width in pixels. After you load the page into a browser and switch the page into design display mode, you can see the effect of the property.
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Overview/CS/webpartzonebase_overview_cs.aspx" id="Snippet3":::
:::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Overview/VB/webpartzonebase_overview_vb.aspx" id="Snippet3":::
]]></format>
</remarks>
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="CloseVerb">
<MemberSignature Language="C#" Value="public virtual System.Web.UI.WebControls.WebParts.WebPartVerb CloseVerb { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.WebControls.WebParts.WebPartVerb CloseVerb" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.WebParts.WebPartZoneBase.CloseVerb" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property CloseVerb As WebPartVerb" />
<MemberSignature Language="F#" Value="member this.CloseVerb : System.Web.UI.WebControls.WebParts.WebPartVerb" Usage="System.Web.UI.WebControls.WebParts.WebPartZoneBase.CloseVerb" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property System::Web::UI::WebControls::WebParts::WebPartVerb ^ CloseVerb { System::Web::UI::WebControls::WebParts::WebPartVerb ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<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.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.NotifyParentProperty(true)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.NotifyParentProperty(true)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]</AttributeName>
<AttributeName Language="F#">[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.WebParts.WebPartVerb</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a reference to a <see cref="T:System.Web.UI.WebControls.WebParts.WebPartVerb" /> object that enables end users to close the <see cref="T:System.Web.UI.WebControls.WebParts.WebPart" /> controls in a zone.</summary>
<value>A <see cref="T:System.Web.UI.WebControls.WebParts.WebPartVerb" /> that enables end users to close <see cref="T:System.Web.UI.WebControls.WebParts.WebPart" /> controls.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The close verb referenced by the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.CloseVerb%2A> property appears in the verbs menu of each <xref:System.Web.UI.WebControls.WebParts.WebPart> control in a zone.
Closing a control removes it from interaction on a page, although if developers provide the appropriate user interface (UI), such as a <xref:System.Web.UI.WebControls.WebParts.CatalogZone> zone that contains a <xref:System.Web.UI.WebControls.WebParts.PageCatalogPart> control, a user can switch the page into <xref:System.Web.UI.WebControls.WebParts.WebPartManager.CatalogDisplayMode> and add a previously closed instance of a control back to the page.
## Examples
The following code example demonstrates the use of the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.CloseVerb%2A> property on a <xref:System.Web.UI.WebControls.WebParts.WebPartZone> control. For the code example to work, you need all the code from the Example section of the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.HelpVerb%2A> property.
The following part of the code example is from the partial class, and contains the code that toggles whether the help verb is enabled or disabled.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Verbs/CS/webpartzonebase_verbs.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Verbs/VB/webpartzonebase_verbs.vb" id="Snippet5":::
The other part of the code example is the Web page that hosts the custom control and contains the UI. Notice that the declarative `<CloseVerb>` element in the zone sets the specific text that represents the close verb in the verbs menu for the <xref:System.Web.UI.WebControls.WebParts.WebPart> control.
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Verbs/CS/webpartzonebase_verbs_cs.aspx" id="Snippet2":::
:::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Verbs/VB/webpartzonebase_verbs_vb.aspx" id="Snippet2":::
Notice also that, because the underlying custom <xref:System.Web.UI.WebControls.WebParts.WebPart> control--named `TextDisplayWebPart`-- used in the code example sets the <xref:System.Web.UI.WebControls.WebParts.WebPart.AllowClose%2A> property to `false` in its constructor, the `<aspSample:TextDisplayPart>` element in the catalog must set the <xref:System.Web.UI.WebControls.WebParts.WebPart.AllowClose%2A> property to `true`, so that the control can be closed in the following code example.
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Verbs/CS/webpartzonebase_verbs_cs.aspx" id="Snippet3":::
:::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Verbs/VB/webpartzonebase_verbs_vb.aspx" id="Snippet3":::
After you load the page in a browser, switch the page into catalog display mode, and add the `TextDisplayWebPart` control to the page. You can use the check boxes to enable and disable the close verb, and you can click the **Close WebPart** verb in the verbs menu to close the control. After you close the control, if you return the page to catalog display mode, you can click the **Page Catalog**, select the original instance of the `TextDisplayWebPart` control that you closed, and reopen it on the page.
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.WebControls.WebParts.WebPartZoneBase.CloseWebPart(System.Web.UI.WebControls.WebParts.WebPart)" />
<altmember cref="P:System.Web.UI.WebControls.WebParts.WebPartZoneBase.DeleteVerb" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="CloseWebPart">
<MemberSignature Language="C#" Value="protected virtual void CloseWebPart (System.Web.UI.WebControls.WebParts.WebPart webPart);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void CloseWebPart(class System.Web.UI.WebControls.WebParts.WebPart webPart) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.WebPartZoneBase.CloseWebPart(System.Web.UI.WebControls.WebParts.WebPart)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub CloseWebPart (webPart As WebPart)" />
<MemberSignature Language="F#" Value="abstract member CloseWebPart : System.Web.UI.WebControls.WebParts.WebPart -> unit
override this.CloseWebPart : System.Web.UI.WebControls.WebParts.WebPart -> unit" Usage="webPartZoneBase.CloseWebPart webPart" />
<MemberSignature Language="C++ CLI" Value="protected:
 virtual void CloseWebPart(System::Web::UI::WebControls::WebParts::WebPart ^ webPart);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="webPart" Type="System.Web.UI.WebControls.WebParts.WebPart" />
</Parameters>
<Docs>
<param name="webPart">The <see cref="T:System.Web.UI.WebControls.WebParts.WebPart" /> control to be closed.</param>
<summary>Closes a selected <see cref="T:System.Web.UI.WebControls.WebParts.WebPart" /> control in a zone.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The typical way for an end user to close a <xref:System.Web.UI.WebControls.WebParts.WebPart> control is by clicking the close verb in the control's title bar. The <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.CloseWebPart%2A> method calls the <xref:System.Web.UI.WebControls.WebParts.WebPartManager.CloseWebPart%2A> method on the <xref:System.Web.UI.WebControls.WebParts.WebPartManager> class, which carries out the action of closing the control. The method should only be used by derived <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> zones such as <xref:System.Web.UI.WebControls.WebParts.WebPartZone>.
A closed <xref:System.Web.UI.WebControls.WebParts.WebPart> control is not rendered on a page. Instead, it is added to the page catalog, which maintains a list of all closed controls on a page. If a Web Parts page on which a user closes a control also has an `<asp:PageCatalogPart>` element declared with a <xref:System.Web.UI.WebControls.WebParts.CatalogZone>, then the user can switch the page into catalog display mode, and add the closed control back to the page.
> [!NOTE]
> For a user to be able to close a <xref:System.Web.UI.WebControls.WebParts.WebPart> control, the <xref:System.Web.UI.WebControls.WebParts.WebPart.AllowClose%2A> property on the control and the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.AllowLayoutChange%2A> property on the zone must both be set to `true`.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="webPart" /> is <see langword="null" />.</exception>
<altmember cref="T:System.Web.UI.WebControls.WebParts.PageCatalogPart" />
<altmember cref="P:System.Web.UI.WebControls.WebParts.WebPart.AllowClose" />
<altmember cref="P:System.Web.UI.WebControls.WebParts.WebPart.Hidden" />
<altmember cref="P:System.Web.UI.WebControls.WebParts.WebPartZoneBase.CloseVerb" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="ConnectVerb">
<MemberSignature Language="C#" Value="public virtual System.Web.UI.WebControls.WebParts.WebPartVerb ConnectVerb { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.WebControls.WebParts.WebPartVerb ConnectVerb" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.WebParts.WebPartZoneBase.ConnectVerb" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property ConnectVerb As WebPartVerb" />
<MemberSignature Language="F#" Value="member this.ConnectVerb : System.Web.UI.WebControls.WebParts.WebPartVerb" Usage="System.Web.UI.WebControls.WebParts.WebPartZoneBase.ConnectVerb" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property System::Web::UI::WebControls::WebParts::WebPartVerb ^ ConnectVerb { System::Web::UI::WebControls::WebParts::WebPartVerb ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<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.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.NotifyParentProperty(true)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.NotifyParentProperty(true)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]</AttributeName>
<AttributeName Language="F#">[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.WebParts.WebPartVerb</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a reference to a <see cref="T:System.Web.UI.WebControls.WebParts.WebPartVerb" /> object that enables end users to create connections between <see cref="T:System.Web.UI.WebControls.WebParts.WebPart" /> controls.</summary>
<value>A <see cref="T:System.Web.UI.WebControls.WebParts.WebPartVerb" /> that creates a connection between two <see cref="T:System.Web.UI.WebControls.WebParts.WebPart" /> controls.</value>
<remarks>To be added.</remarks>
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="ConnectWebPart">
<MemberSignature Language="C#" Value="protected virtual void ConnectWebPart (System.Web.UI.WebControls.WebParts.WebPart webPart);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void ConnectWebPart(class System.Web.UI.WebControls.WebParts.WebPart webPart) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.WebPartZoneBase.ConnectWebPart(System.Web.UI.WebControls.WebParts.WebPart)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub ConnectWebPart (webPart As WebPart)" />
<MemberSignature Language="F#" Value="abstract member ConnectWebPart : System.Web.UI.WebControls.WebParts.WebPart -> unit
override this.ConnectWebPart : System.Web.UI.WebControls.WebParts.WebPart -> unit" Usage="webPartZoneBase.ConnectWebPart webPart" />
<MemberSignature Language="C++ CLI" Value="protected:
 virtual void ConnectWebPart(System::Web::UI::WebControls::WebParts::WebPart ^ webPart);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="webPart" Type="System.Web.UI.WebControls.WebParts.WebPart" />
</Parameters>
<Docs>
<param name="webPart">The <see cref="T:System.Web.UI.WebControls.WebParts.WebPart" /> control that initiates the connection with another selected <see cref="T:System.Web.UI.WebControls.WebParts.WebPart" /> control.</param>
<summary>Initiates the process of creating a connection between two <see cref="T:System.Web.UI.WebControls.WebParts.WebPart" /> controls.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.ConnectWebPart%2A> method can be called only when the page is in connect display mode (<xref:System.Web.UI.WebControls.WebParts.WebPartManager.ConnectDisplayMode>). The method in turn calls the <xref:System.Web.UI.WebControls.WebParts.WebPartManager.BeginWebPartConnecting%2A> method, which completes the several steps necessary to fully connect two <xref:System.Web.UI.WebControls.WebParts.WebPart> controls. The method should only be used by derived <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> zones such as <xref:System.Web.UI.WebControls.WebParts.WebPartZone>.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="webPart" /> is <see langword="null" />.</exception>
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="CreateChildControls">
<MemberSignature Language="C#" Value="protected internal override void CreateChildControls ();" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig virtual instance void CreateChildControls() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.WebPartZoneBase.CreateChildControls" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overrides Sub CreateChildControls ()" />
<MemberSignature Language="F#" Value="override this.CreateChildControls : unit -> unit" Usage="webPartZoneBase.CreateChildControls " />
<MemberSignature Language="C++ CLI" Value="protected public:
 override void CreateChildControls();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Creates the set of child controls contained in a zone.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.CreateChildControls%2A> method overrides the base <xref:System.Web.UI.Control.CreateChildControls%2A?displayProperty=nameWithType> method to create the set of <xref:System.Web.UI.WebControls.WebParts.WebPart> controls contained in a zone. This occurs when the Web Parts page is in design mode, because the layout of the controls on the page (and within zones) can be changed in design mode. The set of <xref:System.Web.UI.WebControls.WebParts.WebPart> controls within a zone must likewise be created to accommodate possible changes in the order or occurrence of controls in the zone.
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.Control.CreateChildControls" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="CreateControlCollection">
<MemberSignature Language="C#" Value="protected override System.Web.UI.ControlCollection CreateControlCollection ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance class System.Web.UI.ControlCollection CreateControlCollection() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.WebPartZoneBase.CreateControlCollection" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function CreateControlCollection () As ControlCollection" />
<MemberSignature Language="F#" Value="override this.CreateControlCollection : unit -> System.Web.UI.ControlCollection" Usage="webPartZoneBase.CreateControlCollection " />
<MemberSignature Language="C++ CLI" Value="protected:
 override System::Web::UI::ControlCollection ^ CreateControlCollection();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.ControlCollection</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Creates a <see cref="T:System.Web.UI.ControlCollection" /> object that contains all the controls in a zone.</summary>
<returns>A <see cref="T:System.Web.UI.ControlCollection" /> that contains references to the <see cref="T:System.Web.UI.WebControls.WebParts.WebPart" /> controls in a zone.</returns>
<remarks>To be added.</remarks>
<altmember cref="T:System.Web.UI.ControlCollection" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="CreateControlStyle">
<MemberSignature Language="C#" Value="protected override System.Web.UI.WebControls.Style CreateControlStyle ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance class System.Web.UI.WebControls.Style CreateControlStyle() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.WebPartZoneBase.CreateControlStyle" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function CreateControlStyle () As Style" />
<MemberSignature Language="F#" Value="override this.CreateControlStyle : unit -> System.Web.UI.WebControls.Style" Usage="webPartZoneBase.CreateControlStyle " />
<MemberSignature Language="C++ CLI" Value="protected:
 override System::Web::UI::WebControls::Style ^ CreateControlStyle();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.Style</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Creates a set of style characteristics that apply to a zone control when it is visible.</summary>
<returns>A <see cref="T:System.Web.UI.WebControls.Style" /> that contains style attributes for a <see cref="T:System.Web.UI.WebControls.WebParts.WebPartZoneBase" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.CreateControlStyle%2A> method creates a set of standard style attributes that apply to <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> zones. The style attributes apply only when a page is in a display mode in which a zone itself is visible, such as catalog, edit, or design display mode.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>If you override the <see cref="M:System.Web.UI.WebControls.WebParts.WebPartZoneBase.CreateControlStyle" /> method to set some specific properties on the created style, do not use the <see cref="M:System.Web.UI.WebControls.Style.#ctor(System.Web.UI.StateBag)" /> version of the constructor, which requires you to pass the control's <see cref="T:System.Web.UI.StateBag" /> object in as a parameter, resulting in the created <see cref="T:System.Web.UI.WebControls.Style" /> object sharing the <see cref="T:System.Web.UI.StateBag" /> with the zone control. This causes rendering problems. Instead, use the <see cref="M:System.Web.UI.WebControls.Style.#ctor" /> version of the constructor, so the <see cref="T:System.Web.UI.WebControls.Style" /> object is independent of the control.</para>
</block>
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="CreateVerbs">
<MemberSignature Language="C#" Value="public event System.Web.UI.WebControls.WebParts.WebPartVerbsEventHandler CreateVerbs;" />
<MemberSignature Language="ILAsm" Value=".event class System.Web.UI.WebControls.WebParts.WebPartVerbsEventHandler CreateVerbs" />
<MemberSignature Language="DocId" Value="E:System.Web.UI.WebControls.WebParts.WebPartZoneBase.CreateVerbs" />
<MemberSignature Language="VB.NET" Value="Public Custom Event CreateVerbs As WebPartVerbsEventHandler " />
<MemberSignature Language="F#" Value="member this.CreateVerbs : System.Web.UI.WebControls.WebParts.WebPartVerbsEventHandler " Usage="member this.CreateVerbs : System.Web.UI.WebControls.WebParts.WebPartVerbsEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:
 event System::Web::UI::WebControls::WebParts::WebPartVerbsEventHandler ^ CreateVerbs;" />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.WebParts.WebPartVerbsEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the verbs are created for a zone that derives from the <see cref="T:System.Web.UI.WebControls.WebParts.WebPartZoneBase" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Page developers can add a handler to this event, and attach additional custom verbs to a <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> child zone.
The <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.CreateVerbs> event is raised when the verbs are created for a zone, which happens either during the <xref:System.Web.UI.Control.PreRender> stage of page processing, or during postback events.
## Examples
The following code example demonstrates a way to create a handler for the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.CreateVerbs> event by overriding the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.OnCreateVerbs%2A> method to add a custom verb to a derived <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> zone.
The code example contains two source files. For the code example to run, you must compile this source code. You can compile it explicitly and put the resulting assembly in your Web site's Bin folder or the global assembly cache. Alternatively, you can put the source code in your site's App_Code folder, where it will be dynamically compiled at run time. This code example uses dynamic compilation. For a walkthrough that demonstrates how to compile, see [Walkthrough: Developing and Using a Custom Web Server Control](https://msdn.microsoft.com/library/6d90782a-a1a4-45a6-b2d4-cf6362b83b08).
The first part of the code example is the source code for a simple control derived from the <xref:System.Web.UI.WebControls.WebParts.WebPart> class.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartVerb2/CS/SimpleControl.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartVerb2/VB/SimpleControl.vb" id="Snippet2":::
The second part of the code example is the source code for a derived <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> zone that overrides the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.OnCreateVerbs%2A> method to add a custom verb to the zone. The code also creates a custom verb that appears in the verbs menu of <xref:System.Web.UI.WebControls.WebParts.WebPart> controls contained in the zone, and the verb creates another copy of the current <xref:System.Web.UI.WebControls.WebParts.WebPart> control.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartVerb2/CS/ZoneWithAddedVerb.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartVerb2/VB/ZoneWithAddedVerb.vb" id="Snippet3":::
The third part of the code example is a Web page that hosts the derived zone and <xref:System.Web.UI.WebControls.WebParts.WebPart> control. Near the top of the page is a `Register` directive to reference the derived zone component. If you load the page in a browser, the <xref:System.Web.UI.WebControls.WebParts.WebPart> control appears in the zone. Click the verbs menu, then click the **CopyWebPart** verb, and it creates a copy of the control.
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartVerb2/CS/Defaultcs.aspx" id="Snippet1":::
:::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartVerb2/VB/Defaultvb.aspx" id="Snippet1":::
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.WebParts.WebPartVerbsEventHandler" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="CreateWebPartChrome">
<MemberSignature Language="C#" Value="protected virtual System.Web.UI.WebControls.WebParts.WebPartChrome CreateWebPartChrome ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance class System.Web.UI.WebControls.WebParts.WebPartChrome CreateWebPartChrome() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.WebPartZoneBase.CreateWebPartChrome" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Function CreateWebPartChrome () As WebPartChrome" />
<MemberSignature Language="F#" Value="abstract member CreateWebPartChrome : unit -> System.Web.UI.WebControls.WebParts.WebPartChrome
override this.CreateWebPartChrome : unit -> System.Web.UI.WebControls.WebParts.WebPartChrome" Usage="webPartZoneBase.CreateWebPartChrome " />
<MemberSignature Language="C++ CLI" Value="protected:
 virtual System::Web::UI::WebControls::WebParts::WebPartChrome ^ CreateWebPartChrome();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.WebParts.WebPartChrome</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Enables derived zones to substitute a custom <see cref="T:System.Web.UI.WebControls.WebParts.WebPartChrome" /> object to change the appearance of <see cref="T:System.Web.UI.WebControls.WebParts.WebPart" /> controls in a zone.</summary>
<returns>A <see cref="T:System.Web.UI.WebControls.WebParts.WebPartChrome" /> that determines how <see cref="T:System.Web.UI.WebControls.WebParts.WebPart" /> controls in a zone are rendered.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Web Parts chrome refers to the peripheral user interface (UI) elements that frame each <xref:System.Web.UI.WebControls.WebParts.WebPart> control in a zone. The chrome for a <xref:System.Web.UI.WebControls.WebParts.WebPart> control includes its border, its title bar, and the icons, title text, and verbs menu that appear within the title bar. The appearance of the chrome is set at the zone level, and applies to all <xref:System.Web.UI.WebControls.WebParts.WebPart> controls in a zone.
> [!IMPORTANT]
> The <xref:System.Web.UI.WebControls.WebParts.WebPartChrome> object affects the entire rendering of the <xref:System.Web.UI.WebControls.WebParts.WebPart> controls, not merely their chrome elements.
To use the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.CreateWebPartChrome%2A> method, you must create a custom <xref:System.Web.UI.WebControls.WebParts.WebPartChrome> object to define the appearance of the chrome for Web Parts controls in a zone. You must also create a custom zone that inherits from the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> class and overrides the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.CreateWebPartChrome%2A> method to be able to substitute your custom chrome object and apply it to the controls in the zone.
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.WebParts.WebPartChrome" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="DeleteVerb">
<MemberSignature Language="C#" Value="public virtual System.Web.UI.WebControls.WebParts.WebPartVerb DeleteVerb { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.WebControls.WebParts.WebPartVerb DeleteVerb" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.WebParts.WebPartZoneBase.DeleteVerb" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property DeleteVerb As WebPartVerb" />
<MemberSignature Language="F#" Value="member this.DeleteVerb : System.Web.UI.WebControls.WebParts.WebPartVerb" Usage="System.Web.UI.WebControls.WebParts.WebPartZoneBase.DeleteVerb" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property System::Web::UI::WebControls::WebParts::WebPartVerb ^ DeleteVerb { System::Web::UI::WebControls::WebParts::WebPartVerb ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<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.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.NotifyParentProperty(true)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.NotifyParentProperty(true)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]</AttributeName>
<AttributeName Language="F#">[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.WebParts.WebPartVerb</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a reference to a <see cref="T:System.Web.UI.WebControls.WebParts.WebPartVerb" /> object that enables end users to delete the <see cref="T:System.Web.UI.WebControls.WebParts.WebPart" /> controls in a zone.</summary>
<value>A <see cref="T:System.Web.UI.WebControls.WebParts.WebPartVerb" /> that enables end users to delete <see cref="T:System.Web.UI.WebControls.WebParts.WebPart" /> controls.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The delete verb referenced by the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.DeleteVerb%2A> property appears in the verbs drop-down menu in the title bar of each dynamic <xref:System.Web.UI.WebControls.WebParts.WebPart> control in a zone. The delete verb is not available on static controls (controls declared in the markup of the Web page). The verb appears in the verbs menu only when the page is in a display mode that enables you to change the page layout, such as <xref:System.Web.UI.WebControls.WebParts.WebPartManager.CatalogDisplayMode> or <xref:System.Web.UI.WebControls.WebParts.WebPartManager.DesignDisplayMode>.
Deleting a control permanently removes the instance of that control from a page. Unlike a closed control, a deleted instance of a control can never be added back to a page. When a user deletes a control, and then switches a page into <xref:System.Web.UI.WebControls.WebParts.WebPartManager.CatalogDisplayMode>, if the <xref:System.Web.UI.WebControls.WebParts.CatalogZone> zone contains a <xref:System.Web.UI.WebControls.WebParts.PageCatalogPart> control, the deleted control instance is not available in it. The user can add a new instance of a control, if the control is available in the catalog, but the deleted instance has been permanently removed.
## Examples
The following code example demonstrates the use of the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.DeleteVerb%2A> property on a <xref:System.Web.UI.WebControls.WebParts.WebPartZone> control. For the code example to work, you need all the code from the Example section of the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.HelpVerb%2A> property.
The following part of the code example is from the partial class, and contains the code that toggles whether the delete verb is enabled or disabled.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Verbs/CS/webpartzonebase_verbs.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Verbs/VB/webpartzonebase_verbs.vb" id="Snippet5":::
The other part of the code example is the Web page that hosts the custom control and contains the user interface (UI). Notice that the declarative `<DeleteVerb>` element in the zone sets the specific text that represents the delete verb in the verbs drop-down menu for the <xref:System.Web.UI.WebControls.WebParts.WebPart> control.
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Verbs/CS/webpartzonebase_verbs_cs.aspx" id="Snippet2":::
:::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Verbs/VB/webpartzonebase_verbs_vb.aspx" id="Snippet2":::
After you load the page in a browser, switch the page into catalog display mode, and add the `TextDisplayWebPart` control to the page. You can use the check boxes to enable and disable the delete verb on the `TextDisplayWebPart` control, but the verb appears on the menu only while the page is in catalog or design display mode. If you click the **Delete WebPart** verb on the menu, the control is permanently deleted, and the deleted instance cannot be added back to the page. However, you can return the page to catalog display mode, and add a new instance of the `TextDisplayWebPart` control.
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.WebControls.WebParts.WebPartZoneBase.DeleteWebPart(System.Web.UI.WebControls.WebParts.WebPart)" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="DeleteWebPart">
<MemberSignature Language="C#" Value="protected virtual void DeleteWebPart (System.Web.UI.WebControls.WebParts.WebPart webPart);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void DeleteWebPart(class System.Web.UI.WebControls.WebParts.WebPart webPart) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.WebPartZoneBase.DeleteWebPart(System.Web.UI.WebControls.WebParts.WebPart)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub DeleteWebPart (webPart As WebPart)" />
<MemberSignature Language="F#" Value="abstract member DeleteWebPart : System.Web.UI.WebControls.WebParts.WebPart -> unit
override this.DeleteWebPart : System.Web.UI.WebControls.WebParts.WebPart -> unit" Usage="webPartZoneBase.DeleteWebPart webPart" />
<MemberSignature Language="C++ CLI" Value="protected:
 virtual void DeleteWebPart(System::Web::UI::WebControls::WebParts::WebPart ^ webPart);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="webPart" Type="System.Web.UI.WebControls.WebParts.WebPart" />
</Parameters>
<Docs>
<param name="webPart">The <see cref="T:System.Web.UI.WebControls.WebParts.WebPart" /> control to be deleted.</param>
<summary>Deletes a selected <see cref="T:System.Web.UI.WebControls.WebParts.WebPart" /> control in a zone.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method calls the <xref:System.Web.UI.WebControls.WebParts.WebPartManager.DeleteWebPart%2A?displayProperty=nameWithType> method, and if `webPart` is static, an exception is thrown because static controls (controls that are declared in the markup of a Web page) cannot be deleted. The method should only be used by derived <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> zones such as <xref:System.Web.UI.WebControls.WebParts.WebPartZone>.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="webPart" /> is <see langword="null" />.</exception>
<altmember cref="P:System.Web.UI.WebControls.WebParts.WebPartZoneBase.DeleteVerb" />
<altmember cref="M:System.Web.UI.WebControls.WebParts.WebPartManager.DeleteWebPart(System.Web.UI.WebControls.WebParts.WebPart)" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="DisplayTitle">
<MemberSignature Language="C#" Value="public virtual string DisplayTitle { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string DisplayTitle" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.WebParts.WebPartZoneBase.DisplayTitle" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property DisplayTitle As String" />
<MemberSignature Language="F#" Value="member this.DisplayTitle : string" Usage="System.Web.UI.WebControls.WebParts.WebPartZoneBase.DisplayTitle" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property System::String ^ DisplayTitle { System::String ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<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>
<AttributeName Language="C#">[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the current value of the text being used as the title for a <see cref="T:System.Web.UI.WebControls.WebParts.WebPartZoneBase" /> zone when the zone itself is visible.</summary>
<value>A string that contains the title text for a zone. The default is the value of the base <see cref="P:System.Web.UI.WebControls.WebParts.WebZone.HeaderText" /> property.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.DisplayTitle%2A> property either gets its value from the base <xref:System.Web.UI.WebControls.WebParts.WebZone.HeaderText%2A> property or, if that value is `null`, uses the <xref:System.Web.UI.Control.ID%2A> value for the zone.
## Examples
The following code example demonstrates the declarative use of the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.DisplayTitle%2A> property on a <xref:System.Web.UI.WebControls.WebParts.WebPartZone> control. For the full code example, including the code-behind source file and the .aspx page that contains the zone in this code, see the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> class overview.
Notice that in the following code example, the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.DisplayTitle%2A> property value is retrieved from the partial class.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Overview/CS/webpartzonebase_overview.cs" id="Snippet9":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Overview/VB/webpartzonebase_overview.vb" id="Snippet9":::
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.WebParts.WebZone.HeaderText" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="DragDropEnabled">
<MemberSignature Language="C#" Value="protected internal bool DragDropEnabled { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool DragDropEnabled" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.WebParts.WebPartZoneBase.DragDropEnabled" />
<MemberSignature Language="VB.NET" Value="Protected Friend ReadOnly Property DragDropEnabled As Boolean" />
<MemberSignature Language="F#" Value="member this.DragDropEnabled : bool" Usage="System.Web.UI.WebControls.WebParts.WebPartZoneBase.DragDropEnabled" />
<MemberSignature Language="C++ CLI" Value="protected public:
 property bool DragDropEnabled { bool get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value that indicates whether <see cref="T:System.Web.UI.WebControls.WebParts.WebPart" /> controls can be dragged into or out of a zone.</summary>
<value>A Boolean value that indicates whether controls can be dragged.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.DragDropEnabled%2A> property indicates whether <xref:System.Web.UI.WebControls.WebParts.WebPart> controls can be dragged into or out of a zone at run time. The property is used specifically for checking whether the page is in a page display mode that allows drag-and-drop editing, and whether the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.AllowLayoutChange%2A> property is set to `true`.
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.WebParts.WebPartZoneBase.AllowLayoutChange" />
<altmember cref="T:System.Web.UI.WebControls.WebParts.WebPartDisplayMode" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="DragHighlightColor">
<MemberSignature Language="C#" Value="public virtual System.Drawing.Color DragHighlightColor { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Drawing.Color DragHighlightColor" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.WebParts.WebPartZoneBase.DragHighlightColor" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property DragHighlightColor As Color" />
<MemberSignature Language="F#" Value="member this.DragHighlightColor : System.Drawing.Color with get, set" Usage="System.Web.UI.WebControls.WebParts.WebPartZoneBase.DragHighlightColor" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property System::Drawing::Color DragHighlightColor { System::Drawing::Color get(); void set(System::Drawing::Color value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultValue(typeof(System.Drawing.Color), "Blue")]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue(typeof(System.Drawing.Color), "Blue")>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.TypeConverter(typeof(System.Web.UI.WebControls.WebColorConverter))]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.TypeConverter(typeof(System.Web.UI.WebControls.WebColorConverter))>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Drawing.Color</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the color around the border of a <see cref="T:System.Web.UI.WebControls.WebParts.WebPartZoneBase" /> zone and its drop-cue regions when a user is dragging a control.</summary>
<value>A <see cref="T:System.Drawing.Color" /> that contains the highlight color. The default color is <see cref="P:System.Drawing.Color.Blue" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When a dragged control is held over a zone where it can be dropped, drop-cue regions appear, showing the area in which the control can be dropped, and it is for these regions, as well as the zone itself, that the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.DragHighlightColor%2A> property affects the border color.
The <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.DragHighlightColor%2A> property enables you to set the color that appears to a user when they drag a control in the zone. The <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.DragHighlightColor%2A> property takes effect only when a Web page is in a display mode that enables the layout of a zone to be changed, such as <xref:System.Web.UI.WebControls.WebParts.WebPartManager.DesignDisplayMode>.
## Examples
The following code example demonstrates the declarative use of the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.DragHighlightColor%2A> property on a <xref:System.Web.UI.WebControls.WebParts.WebPartZone> control. For the full code example, including the code-behind source file and the .aspx page that contains the zone in this code, see the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> class overview.
Notice that the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.DragHighlightColor%2A> property value is set to a specific color. After you load the page into a browser and switch the page into design display mode, you can see the effect of the property when you select and drag the control within its zone, or drag another control into the zone.
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Overview/CS/webpartzonebase_overview_cs.aspx" id="Snippet3":::
:::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Overview/VB/webpartzonebase_overview_vb.aspx" id="Snippet3":::
]]></format>
</remarks>
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="EditVerb">
<MemberSignature Language="C#" Value="public virtual System.Web.UI.WebControls.WebParts.WebPartVerb EditVerb { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.WebControls.WebParts.WebPartVerb EditVerb" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.WebParts.WebPartZoneBase.EditVerb" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property EditVerb As WebPartVerb" />
<MemberSignature Language="F#" Value="member this.EditVerb : System.Web.UI.WebControls.WebParts.WebPartVerb" Usage="System.Web.UI.WebControls.WebParts.WebPartZoneBase.EditVerb" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property System::Web::UI::WebControls::WebParts::WebPartVerb ^ EditVerb { System::Web::UI::WebControls::WebParts::WebPartVerb ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<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.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.NotifyParentProperty(true)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.NotifyParentProperty(true)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]</AttributeName>
<AttributeName Language="F#">[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.WebParts.WebPartVerb</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a reference to a <see cref="T:System.Web.UI.WebControls.WebParts.WebPartVerb" /> object that enables end users to edit <see cref="T:System.Web.UI.WebControls.WebParts.WebPart" /> controls in a zone.</summary>
<value>A <see cref="T:System.Web.UI.WebControls.WebParts.WebPartVerb" /> that enables end users to edit <see cref="T:System.Web.UI.WebControls.WebParts.WebPart" /> controls.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The edit verb referenced by the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.EditVerb%2A> property on a <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> control enables an end user to switch a <xref:System.Web.UI.WebControls.WebParts.WebPart> control in the zone into edit mode, where the user can personalize the appearance, properties, layout, and content of the control.
The same edit verb is used for all controls in a zone. When a Web Parts page enters into the edit display mode (<xref:System.Web.UI.WebControls.WebParts.WebPartManager.EditDisplayMode>), the edit verb becomes visible in the verbs menu of each <xref:System.Web.UI.WebControls.WebParts.WebPart> control contained in the zone.
## Examples
The following code example demonstrates the declarative use of the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase.EditVerb%2A> property on a <xref:System.Web.UI.WebControls.WebParts.WebPartZone> control. Note that the property is accessed declaratively by using the `<EditVerb>` element with the `WebPartZone1` control. An edit verb would be present on this control in edit mode even if you did not use the `<EditVerb>` element here, but by using it, you can set some of its attributes, such as the text that represents the verb in the user interface (UI). For the full code example, including the code-behind source file and the .aspx page that contains the zone in this code, see the <xref:System.Web.UI.WebControls.WebParts.WebPartZoneBase> class overview.
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Overview/CS/webpartzonebase_overview_cs.aspx" id="Snippet2":::
:::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_WebPartZoneBase_Overview/VB/webpartzonebase_overview_vb.aspx" id="Snippet2":::
]]></format>
</remarks>
<related type="Article" href="https://docs.microsoft.com/previous-versions/aspnet/e0s9t4ck(v=vs.100)">ASP.NET Web Parts Controls</related>
</Docs>
</Member>
<Member MemberName="EditWebPart">
<MemberSignature Language="C#" Value="protected virtual void EditWebPart (System.Web.UI.WebControls.WebParts.WebPart webPart);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void EditWebPart(class System.Web.UI.WebControls.WebParts.WebPart webPart) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.WebPartZoneBase.EditWebPart(System.Web.UI.WebControls.WebParts.WebPart)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub EditWebPart (webPart As WebPart)" />