Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
SelectedPartChromeStyle Property

WebPartZoneBase.SelectedPartChromeStyle Property

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

Gets style information for the appearance of a selected WebPart control in a zone.

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

public Style SelectedPartChromeStyle { get; }
/** @property */
public Style get_SelectedPartChromeStyle ()

public function get SelectedPartChromeStyle () : Style

Property Value

A Style that contains style information for the selected WebPart control.

The SelectedPartChromeStyle property allows you to access style characteristics for the selected WebPart control in a zone when a Web Parts page is in edit mode.

The following code example demonstrates the declarative use of the SelectedPartChromeStyle property on a 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 WebPartZoneBase class overview.

Notice that the SelectedPartChromeStyle property has a value assigned to it in the declarative markup. This value impacts WebPartZone1. After you load the page into a browser, switch the page into edit mode. On the verbs menu for one of the WebPart controls, click the verb to edit the control, and note that the background color of the control changes to the color assigned to it in the declarative markup.

  LayoutOrientation="Vertical" >
  <EditVerb Text="Edit WebPart" />
  <SelectedPartChromeStyle BackColor="LightBlue" />
      Title="Favorite Links" >
      <asp:ListItem Value="http://msdn.microsoft.com">
      <asp:ListItem Value="http://www.asp.net">
      <asp:ListItem Value="http://www.msn.com">
    <asp:Calendar ID="Calendar1" Runat="server" 
      Title="My Calendar" />

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

© 2015 Microsoft