Part.ChromeState Özellik
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Parça denetiminin simge durumuna küçültülmüş veya normal durumda olup olmadığını alır veya ayarlar.
public:
virtual property System::Web::UI::WebControls::WebParts::PartChromeState ChromeState { System::Web::UI::WebControls::WebParts::PartChromeState get(); void set(System::Web::UI::WebControls::WebParts::PartChromeState value); };
public virtual System.Web.UI.WebControls.WebParts.PartChromeState ChromeState { get; set; }
member this.ChromeState : System.Web.UI.WebControls.WebParts.PartChromeState with get, set
Public Overridable Property ChromeState As PartChromeState
Özellik Değeri
Değerlerden PartChromeState biri. Varsayılan değer: Normal.
Özel durumlar
Belirtilen değer değerlerden biri PartChromeState değil.
Örnekler
Aşağıdaki kod örneği, özelliğin bir parça denetiminde ChromeState bildirim temelli kullanımını gösterir. Bu örnek, sınıf özetinin Örnek bölümünde Part bulunabilen özel WebPart denetimi TextDisplayWebPart
gerektirir.
Web sayfasının bildirim temelli işaretlemesinde, denetimin ikinci örneğinin TextDisplayWebPart
özelliğini ayarlandığını ChromeState unutmayın. Sayfayı bir tarayıcıda yükledikten sonra ikinci denetim örneği simge durumuna küçültülmüş olarak görünür.
<%@ page language="C#" %>
<%@ register tagprefix="aspSample"
Namespace="Samples.AspNet.CS.Controls"
Assembly="TextDisplayWebPartCS" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>ASP.NET Example</title>
</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>
<%@ page language="VB" %>
<%@ register tagprefix="aspSample"
Namespace="Samples.AspNet.VB.Controls"
Assembly="TextDisplayWebPartVB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>ASP.NET Example</title>
</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>
Açıklamalar
Bir parça denetimi ChromeState normal veya simge durumuna küçültülebilir.
Devralanlara Notlar
gibi WebPart türetilmiş sınıflar, denetimin kenarlık durumunun kullanıcı kişiselleştirmesini etkinleştirmek için geçersiz kılabilir ChromeState .