CatalogPartChrome.CreateCatalogPartChromeStyle Method

Note: This method is new in the .NET Framework version 2.0.

Creates the style object that supplies style attributes for each CatalogPart control rendered by the CatalogPartChrome object.

Namespace: System.Web.UI.WebControls.WebParts
Assembly: System.Web (in system.web.dll)

protected:
virtual Style^ CreateCatalogPartChromeStyle (
	CatalogPart^ catalogPart, 
	PartChromeType chromeType
)
protected Style CreateCatalogPartChromeStyle (
	CatalogPart catalogPart, 
	PartChromeType chromeType
)
protected function CreateCatalogPartChromeStyle (
	catalogPart : CatalogPart, 
	chromeType : PartChromeType
) : Style

Parameters

catalogPart

The control that is currently being rendered.

chromeType

The type of chrome for a particular control; one of the PartChromeType enumeration values.

Return Value

A Style that contains style attributes for catalogPart.

Exception typeCondition

ArgumentNullException

The control that catalogPart refers to is a null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

chromeType is not a PartChromeType.

The CreateCatalogPartChromeStyle method creates a Style object that is used by the CatalogPartChrome object to render a CatalogPart control.

Notes to Implementers If you inherit from the CatalogPartChrome class, you can optionally override the CreateCatalogPartChromeStyle 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.

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

No code example is currently available or this language may not be supported.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show: