Share via


CatalogZoneBase.InstructionText 속성

정의

최종 사용자에 대한 지침을 제공하는 영역의 텍스트를 가져오거나 설정합니다.

public:
 virtual property System::String ^ InstructionText { System::String ^ get(); void set(System::String ^ value); };
public override string InstructionText { get; set; }
member this.InstructionText : string with get, set
Public Overrides Property InstructionText As String

속성 값

최종 사용자에 대한 지침이 포함된 문자열입니다. 기본값인 문화권별 문자열은 웹 파트 컨트롤 집합에서 제공합니다.

예제

다음 코드 예제를 사용 InstructionText 하는 방법에 설명 합니다 선언적이 고 프로그래밍 방식으로 속성입니다. 예제를 실행 하는 데 필요한 전체 코드의 예제 섹션을 참조 하세요.를 CatalogZoneBase 클래스 개요입니다.

코드 예제에서는 두 <asp:catalogzone> 요소를 선언하고 첫 번째 요소는 속성에 대한 InstructionText 값을 선언합니다.

<asp:CatalogZone ID="CatalogZone1" runat="server"
  EmptyZoneText="No controls are in the zone."
  HeaderText="My Web Parts Catalog"
  InstructionText="Add Web Parts controls to the zone."
  PartLinkStyle-Font-Italic="true"
  SelectedPartLinkStyle-Font-Bold="true"
  SelectTargetZoneText="Select zone"
  AddVerb-Text="Add Control"
  CloseVerb-Description="Close and return to browse mode." 
  SelectedCatalogPartID="Currently Selected CatalogPart ID.">
  <ZoneTemplate>
    <asp:DeclarativeCatalogPart ID="DeclarativeCatalogPart1" 
      runat="server">
      <WebPartsTemplate>
        <aspSample:TextDisplayWebPart 
          runat="server"   
          id="textwebpart" 
          title = "Text Content WebPart" 
          ExportMode="All"/>  
        <asp:Calendar id="calendar1" runat="server" 
          Title="My Calendar" />               
      </WebPartsTemplate>
    </asp:DeclarativeCatalogPart> 
    <asp:PageCatalogPart ID="PageCatalogPart1" runat="server" />
    <asp:ImportCatalogPart ID="ImportCatalogPart1" runat="server" /> 
  </ZoneTemplate>
</asp:CatalogZone>
<hr />
<asp:CatalogZone ID="CatalogZone2" runat="server"
  BorderWidth="2"
  HeaderText="My Empty CatalogZone"
  EmptyZoneText="No controls are in the zone." />
<asp:CatalogZone ID="CatalogZone1" runat="server"
  EmptyZoneText="No controls are in the zone."
  HeaderText="My Web Parts Catalog"
  InstructionText="Add Web Parts controls to the zone."
  PartLinkStyle-Font-Italic="true"
  SelectedPartLinkStyle-Font-Bold="true"
  SelectTargetZoneText="Select zone"
  AddVerb-Text="Add Control"
  CloseVerb-Description="Close and return to browse mode." 
  SelectedCatalogPartID="Currently Selected CatalogPart ID.">
  <ZoneTemplate>
    <asp:DeclarativeCatalogPart ID="DeclarativeCatalogPart1" 
      runat="server">
      <WebPartsTemplate>
        <aspSample:TextDisplayWebPart 
          runat="server"   
          id="textwebpart" 
          title = "Text Content WebPart" 
          ExportMode="All"/>  
        <asp:Calendar id="calendar1" runat="server" 
          Title="My Calendar" />               
      </WebPartsTemplate>
    </asp:DeclarativeCatalogPart> 
    <asp:PageCatalogPart ID="PageCatalogPart1" runat="server" />
    <asp:ImportCatalogPart ID="ImportCatalogPart1" runat="server" /> 
  </ZoneTemplate>
</asp:CatalogZone>
<hr />
<asp:CatalogZone ID="CatalogZone2" runat="server"
  BorderWidth="2"
  HeaderText="My Empty CatalogZone"
  EmptyZoneText="No controls are in the zone." />

코드 예제의 두 번째 부분에서는 첫 번째 영역에 있는 속성의 InstructionText 값이 프로그래밍 방식으로 다른 값에 할당됩니다.

protected void Button3_Click(object sender, EventArgs e)
{
  CatalogZone1.SelectTargetZoneText = "Add to zone";
  CatalogZone1.EmptyZoneText = "Zone is empty";
  CatalogZone1.HeaderText = "My Updated Header";
  CatalogZone1.InstructionText = "My Updated Instructions";
}
Protected Sub Button3_Click(ByVal sender As Object, _
  ByVal e As EventArgs)
  CatalogZone1.SelectTargetZoneText = "Add to zone"
  CatalogZone1.EmptyZoneText = "Zone is empty"
  CatalogZone1.HeaderText = "My Updated Header"
  CatalogZone1.InstructionText = "My Updated Instructions"
End Sub

브라우저에서 페이지를 로드할 때 드롭다운 목록에서 카탈로그 를 선택하여 카탈로그 표시 모드로 전환할 수 있습니다. 카탈로그가 표시되면 각 영역의 InstructionText 헤더 영역에 표시되는 속성의 값을 확인합니다. 영역 텍스트 속성 설정 단추를 InstructionText 클릭하면 상위 영역의 속성이 코드에서 할당된 값으로 설정됩니다.

설명

속성의 InstructionText 문자열 값은 영역의 CatalogZoneBase 헤더 영역 바로 아래에 표시됩니다. 페이지가 카탈로그 모드로 InstructionText 전환되고 카탈로그 UI(사용자 인터페이스)가 표시되면 속성의 텍스트가 표시됩니다.

속성의 InstructionText 목적은 카탈로그 UI가 표시될 때 수행할 사항에 대한 일반적인 지침을 사용자에게 제공하는 것입니다.

적용 대상

추가 정보