WebPartZoneBase.SelectedPartChromeStyle 속성

정의

영역에서 선택된 WebPart 컨트롤이 나타나는 모양에 대한 스타일 정보를 가져옵니다.

public:
 property System::Web::UI::WebControls::Style ^ SelectedPartChromeStyle { System::Web::UI::WebControls::Style ^ get(); };
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]
public System.Web.UI.WebControls.Style SelectedPartChromeStyle { get; }
[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)>]
member this.SelectedPartChromeStyle : System.Web.UI.WebControls.Style
Public ReadOnly Property SelectedPartChromeStyle As Style

속성 값

Style

선택된 Style 컨트롤의 스타일 정보가 들어 있는 WebPart입니다.

특성

예제

다음 코드 예제에서는 컨트롤에 속성의 SelectedPartChromeStyle 선언적 사용을 보여 줍니다 WebPartZone . 코드 숨김 소스 파일 및 이 코드의 영역이 포함된 .aspx 페이지를 포함한 전체 코드 예제는 클래스 개요를 WebPartZoneBase 참조하세요.

속성에 SelectedPartChromeStyle 선언적 태그에 할당된 값이 있습니다. 이 값은 영향을 줍니다 WebPartZone1. 브라우저에 페이지를 로드한 후 페이지를 편집 모드로 전환합니다. 컨트롤 중 WebPart 하나에 대한 동사 메뉴에서 동사를 클릭하여 컨트롤을 편집하고 컨트롤의 배경색이 선언적 태그에서 할당된 색으로 변경됩니다.

<asp:WebPartZone 
  ID="WebPartZone1" 
  Runat="server"
  LayoutOrientation="Vertical" >
  <EditVerb Text="Edit WebPart" />
  <SelectedPartChromeStyle BackColor="LightBlue" />
  <ZoneTemplate>
    <asp:BulletedList 
      ID="BulletedList1" 
      Runat="server"
      DisplayMode="HyperLink" 
      Title="Favorite Links" >
      <asp:ListItem Value="http://msdn.microsoft.com">
        MSDN
      </asp:ListItem>
      <asp:ListItem Value="http://www.asp.net">
        ASP.NET
      </asp:ListItem>
      <asp:ListItem Value="http://www.msn.com">
        MSN
      </asp:ListItem>
    </asp:BulletedList>
    <asp:Calendar ID="Calendar1" Runat="server" 
      Title="My Calendar" />
  </ZoneTemplate>
</asp:WebPartZone>
<asp:WebPartZone 
  ID="WebPartZone1" 
  Runat="server"
  LayoutOrientation="Vertical" >
  <EditVerb Text="Edit WebPart" />
  <SelectedPartChromeStyle BackColor="LightBlue" />
  <ZoneTemplate>
    <asp:BulletedList 
      ID="BulletedList1" 
      Runat="server"
      DisplayMode="HyperLink" 
      Title="Favorite Links" >
      <asp:ListItem Value="http://msdn.microsoft.com">
        MSDN
      </asp:ListItem>
      <asp:ListItem Value="http://www.asp.net">
        ASP.NET
      </asp:ListItem>
      <asp:ListItem Value="http://www.msn.com">
        MSN
      </asp:ListItem>
    </asp:BulletedList>
    <asp:Calendar ID="Calendar1" Runat="server" 
      Title="My Calendar" />
  </ZoneTemplate>
</asp:WebPartZone>

설명

SelectedPartChromeStyle 속성을 사용하면 웹 파트 페이지가 편집 모드인 경우 영역에서 선택한 WebPart 컨트롤의 스타일 특성에 액세스할 수 있습니다.

적용 대상

추가 정보