Part.ChromeState Property
Assembly: System.Web (in system.web.dll)
public: virtual property PartChromeState ChromeState { PartChromeState get (); void set (PartChromeState value); }
/** @property */ public PartChromeState get_ChromeState () /** @property */ public void set_ChromeState (PartChromeState value)
public function get ChromeState () : PartChromeState public function set ChromeState (value : PartChromeState)
Property Value
One of the PartChromeState values. The default is Normal.A part control's ChromeState can be normal or minimized.
Notes to Inheritors Derived classes such as WebPart can override ChromeState to enable user personalization of the control's border state.The following code example illustrates the declarative use of the ChromeState property in a part control. This example requires the custom WebPart control TextDisplayWebPart, which can be found in the Example section of the Part class summary.
Note that in the declarative markup for the Web page, the second instance of the TextDisplayWebPart control sets its ChromeState property. After you load the page in a browser, the second control instance appears minimized.
<%@ page language="VJ#" %>
<%@ register tagprefix="aspSample"
Namespace="Samples.AspNet.JSL.Controls"
Assembly="TextDisplayWebPartJSL" %>
<html>
<head id="Head1" runat="server">
</head>
<body>
<form id="Form1" runat="server">
<asp:webpartmanager id="WebPartManager1" runat="server" />
<asp:webpartzone
id="WebPartZone1"
runat="server"
backcolor="#99cccc">
<parttitlestyle font-bold="true" forecolor="#ffffff" />
<partstyle
borderwidth="1px"
borderstyle="Solid"
bordercolor="#81AAF2" />
<zonetemplate>
<aspSample:TextDisplayWebPart
runat="server"
id="textwebpart"
title = "Text Content WebPart"
Description="A text content WebPart control."
ChromeType="TitleAndBorder"
width="350px" />
</zonetemplate>
</asp:webpartzone>
<asp:webpartzone
id="WebPartZone2"
runat="server"
backcolor="#99cccc">
<parttitlestyle font-bold="true" forecolor="#ffffff" />
<partstyle
borderwidth="1px"
borderstyle="Solid"
bordercolor="#81AAF2" />
<zonetemplate>
<aspSample:TextDisplayWebPart
runat="server"
id="textwebpart2"
title = "Text Content WebPart 2"
Description="A text content WebPart control."
ChromeType="TitleOnly"
ChromeState="Minimized"
width="350px" />
</zonetemplate>
</asp:webpartzone>
</form>
</body>
</html>
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.