-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
EditorPartChrome.xml
293 lines (253 loc) · 25.9 KB
/
EditorPartChrome.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
<Type Name="EditorPartChrome" FullName="System.Web.UI.WebControls.WebParts.EditorPartChrome">
<TypeSignature Language="C#" Value="public class EditorPartChrome" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit EditorPartChrome extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.Web.UI.WebControls.WebParts.EditorPartChrome" />
<TypeSignature Language="VB.NET" Value="Public Class EditorPartChrome" />
<TypeSignature Language="F#" Value="type EditorPartChrome = class" />
<TypeSignature Language="C++ CLI" Value="public ref class EditorPartChrome" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Enables developers to override the rendering for only the selected sections of <see cref="T:System.Web.UI.WebControls.WebParts.EditorPart" /> controls in an <see cref="T:System.Web.UI.WebControls.WebParts.EditorZoneBase" /> zone.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Chrome refers to the peripheral user interface (UI) elements that frame each Web Parts control or server control contained in a zone. The chrome for a 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 the controls in the zone.
The Web Parts control set uses the <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome> class to render the chrome for <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls. Additionally, this class provides a way for developers to customize the rendering of any <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls in an <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> zone. For example, you can override the <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome.CreateEditorPartChromeStyle%2A> method to customize some specific style attributes defined in the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> zone.
The <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome> class contains several important methods that are useful when you want to override the rendering of <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls. One is the <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome.%23ctor%2A> constructor, which you use when you override the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.CreateEditorPartChrome%2A> method in a custom <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> class to create an instance of your custom <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome> object. Another useful method is the <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome.RenderPartContents%2A> method, which you can use to control the rendering of the content area of controls in a zone (as opposed to chrome elements such as headers, footers, and title bars). Finally, if you want complete programmatic control over all aspects of rendering the <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls, you can override the <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome.RenderEditorPart%2A> method.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome> class to override the default rendering of <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls in an <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> zone.
The code example has three parts:
- A user control that enables you to change display modes on a Web Parts page.
- A Web page that hosts all the controls in the example.
- A class that contains the source code for a custom <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome> class and <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> zone.
The first part of the code example is the user control. The source code for the user control comes from another topic. For this code example to work, you need to obtain the .ascx file for the user control from the [Walkthrough: Changing Display Modes on a Web Parts Page](https://msdn.microsoft.com/library/24e42f74-82dc-4c13-8574-130398985fc0) topic, and place the file in the same folder as the .aspx page in this code example.
The second part of the example is the Web page. Note that there is a `Register` directive near the top of the file to register the compiled component and a tag prefix. Also note that the page references the custom editor zone using the element `<aspSample:MyEditorZone>`.
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorPartChrome_Overview/CS/EditorPartDemo.aspx" id="Snippet1":::
:::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorPartChrome_Overview/VB/EditorPartDemo.aspx" id="Snippet1":::
The third part of the example contains the implementation of the custom editor part chrome and editor part zone. `MyEditorZone` extends <xref:System.Web.UI.WebControls.WebParts.EditorZone> and overrides <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.CreateEditorPartChrome%2A> to return the custom editor part chrome. `MyEditorPartChrome` changes the background color of the editor part control in the <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome.CreateEditorPartChromeStyle%2A> method. The background color of the zone is changed in the <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome.PerformPreRender%2A> method, and text is added to the editor part in the <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome.RenderPartContents%2A> method.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorPartChrome_Overview/CS/source.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorPartChrome_Overview/VB/source.vb" id="Snippet2":::
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>If you inherit from the <see cref="T:System.Web.UI.WebControls.WebParts.EditorPartChrome" /> class, you must create a customized <see cref="T:System.Web.UI.WebControls.WebParts.EditorZone" /> zone to return your customized <see cref="T:System.Web.UI.WebControls.WebParts.EditorPartChrome" /> class. The Example section of this class overview demonstrates how to create a customized <see cref="T:System.Web.UI.WebControls.WebParts.EditorZone" /> zone to return a customized <see cref="T:System.Web.UI.WebControls.WebParts.EditorPartChrome" /> class</para>
</block>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public EditorPartChrome (System.Web.UI.WebControls.WebParts.EditorZoneBase zone);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Web.UI.WebControls.WebParts.EditorZoneBase zone) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.EditorPartChrome.#ctor(System.Web.UI.WebControls.WebParts.EditorZoneBase)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (zone As EditorZoneBase)" />
<MemberSignature Language="F#" Value="new System.Web.UI.WebControls.WebParts.EditorPartChrome : System.Web.UI.WebControls.WebParts.EditorZoneBase -> System.Web.UI.WebControls.WebParts.EditorPartChrome" Usage="new System.Web.UI.WebControls.WebParts.EditorPartChrome zone" />
<MemberSignature Language="C++ CLI" Value="public:
 EditorPartChrome(System::Web::UI::WebControls::WebParts::EditorZoneBase ^ zone);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="zone" Type="System.Web.UI.WebControls.WebParts.EditorZoneBase" />
</Parameters>
<Docs>
<param name="zone">The associated <see cref="T:System.Web.UI.WebControls.WebParts.EditorZoneBase" />.</param>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.WebControls.WebParts.EditorPartChrome" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome.%23ctor%2A> constructor initializes a new instance of the <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome> class. It is used primarily by an <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> zone in its <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase.CreateEditorPartChrome%2A> method to create an instance of the <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome> object that handles the chrome rendering and any custom rendering for <xref:System.Web.UI.WebControls.WebParts.EditorPart> controls in the zone.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">The <see cref="T:System.Web.UI.WebControls.WebParts.EditorZoneBase" /> that <paramref name="zone" /> refers to is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="CreateEditorPartChromeStyle">
<MemberSignature Language="C#" Value="protected virtual System.Web.UI.WebControls.Style CreateEditorPartChromeStyle (System.Web.UI.WebControls.WebParts.EditorPart editorPart, System.Web.UI.WebControls.WebParts.PartChromeType chromeType);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance class System.Web.UI.WebControls.Style CreateEditorPartChromeStyle(class System.Web.UI.WebControls.WebParts.EditorPart editorPart, valuetype System.Web.UI.WebControls.WebParts.PartChromeType chromeType) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.EditorPartChrome.CreateEditorPartChromeStyle(System.Web.UI.WebControls.WebParts.EditorPart,System.Web.UI.WebControls.WebParts.PartChromeType)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Function CreateEditorPartChromeStyle (editorPart As EditorPart, chromeType As PartChromeType) As Style" />
<MemberSignature Language="F#" Value="abstract member CreateEditorPartChromeStyle : System.Web.UI.WebControls.WebParts.EditorPart * System.Web.UI.WebControls.WebParts.PartChromeType -> System.Web.UI.WebControls.Style
override this.CreateEditorPartChromeStyle : System.Web.UI.WebControls.WebParts.EditorPart * System.Web.UI.WebControls.WebParts.PartChromeType -> System.Web.UI.WebControls.Style" Usage="editorPartChrome.CreateEditorPartChromeStyle (editorPart, chromeType)" />
<MemberSignature Language="C++ CLI" Value="protected:
 virtual System::Web::UI::WebControls::Style ^ CreateEditorPartChromeStyle(System::Web::UI::WebControls::WebParts::EditorPart ^ editorPart, System::Web::UI::WebControls::WebParts::PartChromeType chromeType);" />
<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>
<Parameter Name="editorPart" Type="System.Web.UI.WebControls.WebParts.EditorPart" />
<Parameter Name="chromeType" Type="System.Web.UI.WebControls.WebParts.PartChromeType" />
</Parameters>
<Docs>
<param name="editorPart">The control that is currently being rendered.</param>
<param name="chromeType">The type of chrome for a particular control; one of the <see cref="T:System.Web.UI.WebControls.WebParts.PartChromeType" /> enumeration values.</param>
<summary>Creates the style object that supplies style attributes for each <see cref="T:System.Web.UI.WebControls.WebParts.EditorPart" /> control rendered by the <see cref="T:System.Web.UI.WebControls.WebParts.EditorPartChrome" /> object.</summary>
<returns>A <see cref="T:System.Web.UI.WebControls.Style" /> that contains style attributes for <paramref name="editorPart" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome.CreateEditorPartChromeStyle%2A> method creates a <xref:System.Web.UI.WebControls.Style> object that is used by the <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome> object to render an <xref:System.Web.UI.WebControls.WebParts.EditorPart> control.
## Examples
The following code example demonstrates how to override the <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome.CreateEditorPartChromeStyle%2A> method to change the background color of the editor part control. For the full code required to run the example, including the Web page to host these controls, see the Example section of the <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome> class overview.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorPartChrome_Overview/CS/source.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorPartChrome_Overview/VB/source.vb" id="Snippet3":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">The control that <paramref name="editorPart" /> refers to is <see langword="null" />.</exception>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="chromeType" /> is not a <see cref="T:System.Web.UI.WebControls.WebParts.PartChromeType" />.</exception>
<block subset="none" type="overrides">
<para>If you inherit from the <see cref="T:System.Web.UI.WebControls.WebParts.EditorPartChrome" /> class, you can optionally override the <see cref="M:System.Web.UI.WebControls.WebParts.EditorPartChrome.CreateEditorPartChromeStyle(System.Web.UI.WebControls.WebParts.EditorPart,System.Web.UI.WebControls.WebParts.PartChromeType)" /> method, and merge the style information from the base method with custom style attributes that you want to add. For a demonstration, see the Example section.</para>
</block>
</Docs>
</Member>
<Member MemberName="PerformPreRender">
<MemberSignature Language="C#" Value="public virtual void PerformPreRender ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void PerformPreRender() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.EditorPartChrome.PerformPreRender" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub PerformPreRender ()" />
<MemberSignature Language="F#" Value="abstract member PerformPreRender : unit -> unit
override this.PerformPreRender : unit -> unit" Usage="editorPartChrome.PerformPreRender " />
<MemberSignature Language="C++ CLI" Value="public:
 virtual void PerformPreRender();" />
<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>Performs tasks that must be done prior to rendering <see cref="T:System.Web.UI.WebControls.WebParts.EditorPart" /> controls.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome.PerformPreRender%2A> method allows you to perform tasks that must be done during the <xref:System.Web.UI.Control.PreRender> event and cannot be done when the control is rendered, such as applying a style sheet to a control.
## Examples
The following code example demonstrates how to override the <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome.PerformPreRender%2A> method to change the background color of the editor zone. For the full code required to run the example, including the Web page to host these controls, see the Example section of the <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome> class overview.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorPartChrome_Overview/CS/source.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorPartChrome_Overview/VB/source.vb" id="Snippet4":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="RenderEditorPart">
<MemberSignature Language="C#" Value="public virtual void RenderEditorPart (System.Web.UI.HtmlTextWriter writer, System.Web.UI.WebControls.WebParts.EditorPart editorPart);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void RenderEditorPart(class System.Web.UI.HtmlTextWriter writer, class System.Web.UI.WebControls.WebParts.EditorPart editorPart) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.EditorPartChrome.RenderEditorPart(System.Web.UI.HtmlTextWriter,System.Web.UI.WebControls.WebParts.EditorPart)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub RenderEditorPart (writer As HtmlTextWriter, editorPart As EditorPart)" />
<MemberSignature Language="F#" Value="abstract member RenderEditorPart : System.Web.UI.HtmlTextWriter * System.Web.UI.WebControls.WebParts.EditorPart -> unit
override this.RenderEditorPart : System.Web.UI.HtmlTextWriter * System.Web.UI.WebControls.WebParts.EditorPart -> unit" Usage="editorPartChrome.RenderEditorPart (writer, editorPart)" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual void RenderEditorPart(System::Web::UI::HtmlTextWriter ^ writer, System::Web::UI::WebControls::WebParts::EditorPart ^ editorPart);" />
<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="writer" Type="System.Web.UI.HtmlTextWriter" />
<Parameter Name="editorPart" Type="System.Web.UI.WebControls.WebParts.EditorPart" />
</Parameters>
<Docs>
<param name="writer">The <see cref="T:System.Web.UI.HtmlTextWriter" /> that receives the <paramref name="editorPart" /> content.</param>
<param name="editorPart">The control currently being rendered.</param>
<summary>Renders a complete <see cref="T:System.Web.UI.WebControls.WebParts.EditorPart" /> control with all its sections.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome.RenderEditorPart%2A> method renders the complete <xref:System.Web.UI.WebControls.WebParts.EditorPart> control, with header, contents, and footer. Overriding this method gives a developer complete programmatic control over rendering all aspects of `editorPart`; for that reason, overriding this method is quite complex.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">The control that <paramref name="editorPart" /> refers to is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="RenderPartContents">
<MemberSignature Language="C#" Value="protected virtual void RenderPartContents (System.Web.UI.HtmlTextWriter writer, System.Web.UI.WebControls.WebParts.EditorPart editorPart);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void RenderPartContents(class System.Web.UI.HtmlTextWriter writer, class System.Web.UI.WebControls.WebParts.EditorPart editorPart) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.EditorPartChrome.RenderPartContents(System.Web.UI.HtmlTextWriter,System.Web.UI.WebControls.WebParts.EditorPart)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub RenderPartContents (writer As HtmlTextWriter, editorPart As EditorPart)" />
<MemberSignature Language="F#" Value="abstract member RenderPartContents : System.Web.UI.HtmlTextWriter * System.Web.UI.WebControls.WebParts.EditorPart -> unit
override this.RenderPartContents : System.Web.UI.HtmlTextWriter * System.Web.UI.WebControls.WebParts.EditorPart -> unit" Usage="editorPartChrome.RenderPartContents (writer, editorPart)" />
<MemberSignature Language="C++ CLI" Value="protected:
 virtual void RenderPartContents(System::Web::UI::HtmlTextWriter ^ writer, System::Web::UI::WebControls::WebParts::EditorPart ^ editorPart);" />
<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="writer" Type="System.Web.UI.HtmlTextWriter" />
<Parameter Name="editorPart" Type="System.Web.UI.WebControls.WebParts.EditorPart" />
</Parameters>
<Docs>
<param name="writer">The <see cref="T:System.Web.UI.HtmlTextWriter" /> that receives the <paramref name="editorPart" /> content.</param>
<param name="editorPart">The control currently being rendered.</param>
<summary>Renders the main content area of an <see cref="T:System.Web.UI.WebControls.WebParts.EditorPart" /> control, excluding the header and footer.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome.RenderPartContents%2A> method enables you to override the rendering of the body area of `editorPart`, while leaving rendering of the header and footer to the default rendering.
## Examples
The following code example demonstrates how to override the <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome.RenderPartContents%2A> method to add text to the editor part. For the full code required to run the example, including the Web page to host these controls, see the Example section of the <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome> class overview.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_EditorPartChrome_Overview/CS/source.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_EditorPartChrome_Overview/VB/source.vb" id="Snippet5":::
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>You can optionally override the <see cref="M:System.Web.UI.WebControls.WebParts.EditorPartChrome.RenderPartContents(System.Web.UI.HtmlTextWriter,System.Web.UI.WebControls.WebParts.EditorPart)" /> method. If so, you can simply perform whatever rendering customizations you want for <paramref name="editorPart" />, and then call its <see cref="M:System.Web.UI.Control.RenderControl(System.Web.UI.HtmlTextWriter)" /> method.</para>
</block>
</Docs>
</Member>
<Member MemberName="Zone">
<MemberSignature Language="C#" Value="protected System.Web.UI.WebControls.WebParts.EditorZoneBase Zone { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.WebControls.WebParts.EditorZoneBase Zone" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.WebParts.EditorPartChrome.Zone" />
<MemberSignature Language="VB.NET" Value="Protected ReadOnly Property Zone As EditorZoneBase" />
<MemberSignature Language="F#" Value="member this.Zone : System.Web.UI.WebControls.WebParts.EditorZoneBase" Usage="System.Web.UI.WebControls.WebParts.EditorPartChrome.Zone" />
<MemberSignature Language="C++ CLI" Value="protected:
 property System::Web::UI::WebControls::WebParts::EditorZoneBase ^ Zone { System::Web::UI::WebControls::WebParts::EditorZoneBase ^ get(); };" />
<MemberType>Property</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#">[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.Web.UI.WebControls.WebParts.EditorZoneBase</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a reference to the associated <see cref="T:System.Web.UI.WebControls.WebParts.EditorZoneBase" /> zone.</summary>
<value>A reference to an <see cref="T:System.Web.UI.WebControls.WebParts.EditorZoneBase" /> that is associated with the <see cref="T:System.Web.UI.WebControls.WebParts.EditorPartChrome" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome.Zone%2A> property provides a reference to the <xref:System.Web.UI.WebControls.WebParts.EditorZoneBase> zone that contains the controls for which the <xref:System.Web.UI.WebControls.WebParts.EditorPartChrome> object provides rendering.
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>