CatalogPartChrome.PerformPreRender Method

Definition

Performs tasks that must be done prior to rendering CatalogPart controls.

C#
public virtual void PerformPreRender();

Examples

The following code example demonstrates how to override the PerformPreRender 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 CatalogPartChrome class overview.

C#
public override void PerformPreRender()
{
    Style zoneStyle = new Style();
    zoneStyle.BackColor = Color.Cornsilk;

    Zone.Page.Header.StyleSheet.RegisterStyle(zoneStyle, null);
    Zone.MergeStyle(zoneStyle);
}

Remarks

The PerformPreRender method allows you to perform tasks that must be done during PreRender and cannot be done when the control is rendered, such as applying a style sheet to a control.

Applies to

Proizvod Verzije
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1