/
CatalogPartChrome.xml
299 lines (259 loc) · 26.7 KB
/
CatalogPartChrome.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
<Type Name="CatalogPartChrome" FullName="System.Web.UI.WebControls.WebParts.CatalogPartChrome">
<TypeSignature Language="C#" Value="public class CatalogPartChrome" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit CatalogPartChrome extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.Web.UI.WebControls.WebParts.CatalogPartChrome" />
<TypeSignature Language="VB.NET" Value="Public Class CatalogPartChrome" />
<TypeSignature Language="F#" Value="type CatalogPartChrome = class" />
<TypeSignature Language="C++ CLI" Value="public ref class CatalogPartChrome" />
<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.CatalogPart" /> controls in a <see cref="T:System.Web.UI.WebControls.WebParts.CatalogZoneBase" /> 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.CatalogPartChrome> class to render the chrome for <xref:System.Web.UI.WebControls.WebParts.CatalogPart> controls. Additionally, this class provides a way for developers to customize the rendering of any <xref:System.Web.UI.WebControls.WebParts.CatalogPart> controls in a <xref:System.Web.UI.WebControls.WebParts.CatalogZoneBase> zone. For example, you can override the <xref:System.Web.UI.WebControls.WebParts.CatalogPartChrome.CreateCatalogPartChromeStyle%2A> method to customize some specific style attributes applied to the <xref:System.Web.UI.WebControls.WebParts.CatalogZoneBase> zone.
The <xref:System.Web.UI.WebControls.WebParts.CatalogPartChrome> class contains several important methods that are useful when you want to override the rendering of <xref:System.Web.UI.WebControls.WebParts.CatalogPart> controls. One is the <xref:System.Web.UI.WebControls.WebParts.CatalogPartChrome.%23ctor%2A> constructor, which you use when you override the <xref:System.Web.UI.WebControls.WebParts.CatalogZoneBase.CreateCatalogPartChrome%2A> method in a custom <xref:System.Web.UI.WebControls.WebParts.CatalogZoneBase> zone to create an instance of your custom <xref:System.Web.UI.WebControls.WebParts.CatalogPartChrome> object. Another useful method is the <xref:System.Web.UI.WebControls.WebParts.CatalogPartChrome.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.CatalogPart> controls, you can override the <xref:System.Web.UI.WebControls.WebParts.CatalogPartChrome.RenderCatalogPart%2A> method.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.WebParts.CatalogPartChrome> class to override the default rendering of <xref:System.Web.UI.WebControls.WebParts.CatalogPart> controls in a <xref:System.Web.UI.WebControls.WebParts.CatalogZoneBase> 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.CatalogPartChrome> class and <xref:System.Web.UI.WebControls.WebParts.CatalogZoneBase> 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 catalog zone using the element `<aspSample:MyCatalogZone>`.
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogPartChrome_Overview/CS/CatalogPartDemo.aspx" id="Snippet1":::
:::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogPartChrome_Overview/VB/CatalogPartDemo.aspx" id="Snippet1":::
The third part of the example contains the implementation of the custom catalog part chrome and catalog part zone. `MyCatalogZone` extends <xref:System.Web.UI.WebControls.WebParts.CatalogZone> and overrides <xref:System.Web.UI.WebControls.WebParts.CatalogZoneBase.CreateCatalogPartChrome%2A> to return the custom catalog part chrome. `MyCatalogPartChrome` changes the background color of the catalog control in the <xref:System.Web.UI.WebControls.WebParts.CatalogPartChrome.CreateCatalogPartChromeStyle%2A> method. The background color of the zone is changed in the <xref:System.Web.UI.WebControls.WebParts.CatalogPartChrome.PerformPreRender%2A> method, and text is added to the catalog part in the <xref:System.Web.UI.WebControls.WebParts.CatalogPartChrome.RenderPartContents%2A> method.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogPartChrome_Overview/CS/source2.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogPartChrome_Overview/VB/source2.vb" id="Snippet2":::
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>If you inherit from the <see cref="T:System.Web.UI.WebControls.WebParts.CatalogPartChrome" /> class, you must create a customized <see cref="T:System.Web.UI.WebControls.WebParts.CatalogZone" /> zone to return your customized <see cref="T:System.Web.UI.WebControls.WebParts.CatalogPartChrome" /> class. The Example section for this class overview demonstrates how to create a customized <see cref="T:System.Web.UI.WebControls.WebParts.CatalogZone" /> zone to return a customized <see cref="T:System.Web.UI.WebControls.WebParts.CatalogPartChrome" /> class.</para>
</block>
<altmember cref="M:System.Web.UI.WebControls.WebParts.CatalogZoneBase.CreateCatalogPartChrome" />
<altmember cref="T:System.Web.UI.WebControls.WebParts.CatalogPart" />
<altmember cref="T:System.Web.UI.WebControls.WebParts.WebPartChrome" />
<altmember cref="T:System.Web.UI.WebControls.WebParts.EditorPartChrome" />
<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="public CatalogPartChrome (System.Web.UI.WebControls.WebParts.CatalogZoneBase zone);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Web.UI.WebControls.WebParts.CatalogZoneBase zone) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.CatalogPartChrome.#ctor(System.Web.UI.WebControls.WebParts.CatalogZoneBase)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (zone As CatalogZoneBase)" />
<MemberSignature Language="F#" Value="new System.Web.UI.WebControls.WebParts.CatalogPartChrome : System.Web.UI.WebControls.WebParts.CatalogZoneBase -> System.Web.UI.WebControls.WebParts.CatalogPartChrome" Usage="new System.Web.UI.WebControls.WebParts.CatalogPartChrome zone" />
<MemberSignature Language="C++ CLI" Value="public:
 CatalogPartChrome(System::Web::UI::WebControls::WebParts::CatalogZoneBase ^ 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.CatalogZoneBase" />
</Parameters>
<Docs>
<param name="zone">The associated <see cref="T:System.Web.UI.WebControls.WebParts.CatalogZoneBase" />.</param>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.WebControls.WebParts.CatalogPartChrome" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.CatalogPartChrome.%23ctor%2A> constructor initializes a new instance of the <xref:System.Web.UI.WebControls.WebParts.CatalogPartChrome> class. It is used primarily by a <xref:System.Web.UI.WebControls.WebParts.CatalogZoneBase> zone in its <xref:System.Web.UI.WebControls.WebParts.CatalogZoneBase.CreateCatalogPartChrome%2A> method to create an instance of the <xref:System.Web.UI.WebControls.WebParts.CatalogPartChrome> object that handles the chrome rendering and any custom rendering for <xref:System.Web.UI.WebControls.WebParts.CatalogPart> controls in the zone.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">The <see cref="T:System.Web.UI.WebControls.WebParts.CatalogZoneBase" /> that <paramref name="zone" /> refers to is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="CreateCatalogPartChromeStyle">
<MemberSignature Language="C#" Value="protected virtual System.Web.UI.WebControls.Style CreateCatalogPartChromeStyle (System.Web.UI.WebControls.WebParts.CatalogPart catalogPart, System.Web.UI.WebControls.WebParts.PartChromeType chromeType);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance class System.Web.UI.WebControls.Style CreateCatalogPartChromeStyle(class System.Web.UI.WebControls.WebParts.CatalogPart catalogPart, valuetype System.Web.UI.WebControls.WebParts.PartChromeType chromeType) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.CatalogPartChrome.CreateCatalogPartChromeStyle(System.Web.UI.WebControls.WebParts.CatalogPart,System.Web.UI.WebControls.WebParts.PartChromeType)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Function CreateCatalogPartChromeStyle (catalogPart As CatalogPart, chromeType As PartChromeType) As Style" />
<MemberSignature Language="F#" Value="abstract member CreateCatalogPartChromeStyle : System.Web.UI.WebControls.WebParts.CatalogPart * System.Web.UI.WebControls.WebParts.PartChromeType -> System.Web.UI.WebControls.Style
override this.CreateCatalogPartChromeStyle : System.Web.UI.WebControls.WebParts.CatalogPart * System.Web.UI.WebControls.WebParts.PartChromeType -> System.Web.UI.WebControls.Style" Usage="catalogPartChrome.CreateCatalogPartChromeStyle (catalogPart, chromeType)" />
<MemberSignature Language="C++ CLI" Value="protected:
 virtual System::Web::UI::WebControls::Style ^ CreateCatalogPartChromeStyle(System::Web::UI::WebControls::WebParts::CatalogPart ^ catalogPart, 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="catalogPart" Type="System.Web.UI.WebControls.WebParts.CatalogPart" />
<Parameter Name="chromeType" Type="System.Web.UI.WebControls.WebParts.PartChromeType" />
</Parameters>
<Docs>
<param name="catalogPart">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.CatalogPart" /> control rendered by the <see cref="T:System.Web.UI.WebControls.WebParts.CatalogPartChrome" /> object.</summary>
<returns>A <see cref="T:System.Web.UI.WebControls.Style" /> that contains style attributes for <paramref name="catalogPart" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.CatalogPartChrome.CreateCatalogPartChromeStyle%2A> method creates a <xref:System.Web.UI.WebControls.Style> object that is used by the <xref:System.Web.UI.WebControls.WebParts.CatalogPartChrome> object to render a <xref:System.Web.UI.WebControls.WebParts.CatalogPart> control.
## Examples
The following code example demonstrates how to override the <xref:System.Web.UI.WebControls.WebParts.CatalogPartChrome.CreateCatalogPartChromeStyle%2A> method to change the background color of the catalog 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.CatalogPartChrome> class overview.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogPartChrome_Overview/CS/source2.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogPartChrome_Overview/VB/source2.vb" id="Snippet3":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">The control that <paramref name="catalogPart" /> 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.CatalogPartChrome" /> class, you can optionally override the <see cref="M:System.Web.UI.WebControls.WebParts.CatalogPartChrome.CreateCatalogPartChromeStyle(System.Web.UI.WebControls.WebParts.CatalogPart,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.CatalogPartChrome.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="catalogPartChrome.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.CatalogPart" /> controls.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.CatalogPartChrome.PerformPreRender%2A> method allows you to perform tasks that must be done during <xref:System.Web.UI.Control.PreRender> 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.CatalogPartChrome.PerformPreRender%2A> method to change the background color of the catalog 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.CatalogPartChrome> class overview.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogPartChrome_Overview/CS/source2.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogPartChrome_Overview/VB/source2.vb" id="Snippet4":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="RenderCatalogPart">
<MemberSignature Language="C#" Value="public virtual void RenderCatalogPart (System.Web.UI.HtmlTextWriter writer, System.Web.UI.WebControls.WebParts.CatalogPart catalogPart);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void RenderCatalogPart(class System.Web.UI.HtmlTextWriter writer, class System.Web.UI.WebControls.WebParts.CatalogPart catalogPart) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.CatalogPartChrome.RenderCatalogPart(System.Web.UI.HtmlTextWriter,System.Web.UI.WebControls.WebParts.CatalogPart)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub RenderCatalogPart (writer As HtmlTextWriter, catalogPart As CatalogPart)" />
<MemberSignature Language="F#" Value="abstract member RenderCatalogPart : System.Web.UI.HtmlTextWriter * System.Web.UI.WebControls.WebParts.CatalogPart -> unit
override this.RenderCatalogPart : System.Web.UI.HtmlTextWriter * System.Web.UI.WebControls.WebParts.CatalogPart -> unit" Usage="catalogPartChrome.RenderCatalogPart (writer, catalogPart)" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual void RenderCatalogPart(System::Web::UI::HtmlTextWriter ^ writer, System::Web::UI::WebControls::WebParts::CatalogPart ^ catalogPart);" />
<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="catalogPart" Type="System.Web.UI.WebControls.WebParts.CatalogPart" />
</Parameters>
<Docs>
<param name="writer">The <see cref="T:System.Web.UI.HtmlTextWriter" /> that receives the <paramref name="catalogPart" /> content.</param>
<param name="catalogPart">The control currently being rendered.</param>
<summary>Renders a complete <see cref="T:System.Web.UI.WebControls.WebParts.CatalogPart" /> control with all its sections.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.CatalogPartChrome.RenderCatalogPart%2A> method renders the complete <xref:System.Web.UI.WebControls.WebParts.CatalogPart> control, with header, contents, and footer. Overriding this method gives a developer complete programmatic control over rendering all aspects of `catalogPart`; for that reason, overriding this method is quite complex.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">The control that <paramref name="catalogPart" /> 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.CatalogPart catalogPart);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void RenderPartContents(class System.Web.UI.HtmlTextWriter writer, class System.Web.UI.WebControls.WebParts.CatalogPart catalogPart) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.WebParts.CatalogPartChrome.RenderPartContents(System.Web.UI.HtmlTextWriter,System.Web.UI.WebControls.WebParts.CatalogPart)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub RenderPartContents (writer As HtmlTextWriter, catalogPart As CatalogPart)" />
<MemberSignature Language="F#" Value="abstract member RenderPartContents : System.Web.UI.HtmlTextWriter * System.Web.UI.WebControls.WebParts.CatalogPart -> unit
override this.RenderPartContents : System.Web.UI.HtmlTextWriter * System.Web.UI.WebControls.WebParts.CatalogPart -> unit" Usage="catalogPartChrome.RenderPartContents (writer, catalogPart)" />
<MemberSignature Language="C++ CLI" Value="protected:
 virtual void RenderPartContents(System::Web::UI::HtmlTextWriter ^ writer, System::Web::UI::WebControls::WebParts::CatalogPart ^ catalogPart);" />
<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="catalogPart" Type="System.Web.UI.WebControls.WebParts.CatalogPart" />
</Parameters>
<Docs>
<param name="writer">The <see cref="T:System.Web.UI.HtmlTextWriter" /> that receives the <paramref name="catalogPart" /> content.</param>
<param name="catalogPart">The control currently being rendered.</param>
<summary>Renders the main content area of a <see cref="T:System.Web.UI.WebControls.WebParts.CatalogPart" /> control, excluding the header and footer.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.CatalogPartChrome.RenderPartContents%2A> method enables you to override the rendering of the body area of `catalogPart`, 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.CatalogPartChrome.RenderPartContents%2A> method to add text to the catalog 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.CatalogPartChrome> class overview.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/WebParts_CatalogPartChrome_Overview/CS/source2.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/WebParts_CatalogPartChrome_Overview/VB/source2.vb" id="Snippet5":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">The control that <paramref name="catalogPart" /> refers to is <see langword="null" />.</exception>
<block subset="none" type="overrides">
<para>You can optionally override the <see cref="M:System.Web.UI.WebControls.WebParts.CatalogPartChrome.RenderPartContents(System.Web.UI.HtmlTextWriter,System.Web.UI.WebControls.WebParts.CatalogPart)" /> method. If so, you can simply perform whatever rendering customizations you want for <paramref name="catalogPart" />, 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.CatalogZoneBase Zone { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.WebControls.WebParts.CatalogZoneBase Zone" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.WebParts.CatalogPartChrome.Zone" />
<MemberSignature Language="VB.NET" Value="Protected ReadOnly Property Zone As CatalogZoneBase" />
<MemberSignature Language="F#" Value="member this.Zone : System.Web.UI.WebControls.WebParts.CatalogZoneBase" Usage="System.Web.UI.WebControls.WebParts.CatalogPartChrome.Zone" />
<MemberSignature Language="C++ CLI" Value="protected:
 property System::Web::UI::WebControls::WebParts::CatalogZoneBase ^ Zone { System::Web::UI::WebControls::WebParts::CatalogZoneBase ^ 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.CatalogZoneBase</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a reference to the associated <see cref="T:System.Web.UI.WebControls.WebParts.CatalogZoneBase" /> zone.</summary>
<value>A reference to a <see cref="T:System.Web.UI.WebControls.WebParts.CatalogZoneBase" /> that is associated with the <see cref="T:System.Web.UI.WebControls.WebParts.CatalogPartChrome" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.WebParts.CatalogPartChrome.Zone%2A> property provides a reference to the <xref:System.Web.UI.WebControls.WebParts.CatalogZoneBase> zone that contains the controls for which the <xref:System.Web.UI.WebControls.WebParts.CatalogPartChrome> object provides rendering.
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>