CatalogZoneBase.InstructionText Propriedade

Definição

Obtém ou define o texto em uma zona que fornece instruções para os usuários finais.Gets or sets the text in a zone that provides directions for end users.

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

Valor da propriedade

String

Uma cadeia de caracteres que contém as instruções para usuários finais.A string that contains the directions for end users. Uma cadeia de caracteres padrão específica da cultura é fornecida pelo conjunto de controle Web Parts.A default, culture-specific string is provided by the Web Parts control set.

Exemplos

O exemplo de código a seguir demonstra como usar a InstructionText propriedade de forma declarativa e programaticamente.The following code example demonstrates how to use the InstructionText property declaratively and programmatically. Para obter o código completo necessário para executar o exemplo, consulte a seção de exemplo da CatalogZoneBase classe visão geral.For the full code required to run the example, see the Example section of the CatalogZoneBase class overview.

Observe que o exemplo de código declara dois <asp:catalogzone> elementos, e o primeiro declara um valor para a InstructionText propriedade.Notice that the code example declares two <asp:catalogzone> elements, and the first one declares a value for the InstructionText property.

<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." />

Na segunda parte do exemplo de código, o valor da InstructionText Propriedade na primeira zona é atribuído programaticamente a um valor diferente.In the second part of the code example, the value of the InstructionText property in the first zone is programmatically assigned to a different value.

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

Ao carregar a página em um navegador, você pode selecionar Catálogo na lista suspensa para alternar para o modo de exibição de catálogo.When you load the page in a browser, you can select Catalog from the drop-down list to switch to catalog display mode. Quando o catálogo estiver visível, observe o valor da InstructionText propriedade exibida na área de cabeçalho de cada zona.When the catalog is visible, notice the value of the InstructionText property displayed in the header area of each zone. Você pode clicar no botão definir propriedades de texto da zona e a InstructionText propriedade da zona superior é definida como o valor atribuído a ela no código.You can click the Set Zone Text Properties button, and the InstructionText property of the upper zone is set to the value assigned to it in the code.

Comentários

O valor da cadeia de caracteres da InstructionText propriedade é exibido logo abaixo da área de cabeçalho de uma CatalogZoneBase zona.The string value of the InstructionText property is displayed just below the header area of a CatalogZoneBase zone. O texto da InstructionText propriedade é exibido quando uma página entra no modo de catálogo e a interface do usuário do catálogo (IU) fica visível.The text of the InstructionText property is displayed when a page enters catalog mode and the catalog user interface (UI) becomes visible.

A finalidade da InstructionText propriedade é fornecer ao usuário instruções gerais sobre o que fazer quando a interface do usuário do catálogo é exibida.The purpose of the InstructionText property is to provide the user with general instructions on what to do when the catalog UI is displayed.

Aplica-se a

Confira também