Menu.ScrollDownText Proprietà

Definizione

Ottiene o imposta il testo alternativo per l'immagine specificata nella proprietà ScrollDownImageUrl.

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

Valore della proprietà

Testo alternativo dell'immagine specificata nella proprietà ScrollDownImageUrl. Il valore predefinito è una stringa vuota (""), a indicare che questa proprietà non è impostata.

Esempio

Nell'esempio di codice seguente viene illustrato come usare la ScrollDownText proprietà per specificare il testo alternativo per l'immagine usata per indicare che l'utente può scorrere verso il basso in un menu dinamico per altre voci di menu.


<%@ Page Language="C#" %>

<!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 runat="server">
    <title>Menu Example</title>
</head>
<body>
    <form id="form1" runat="server">
    
      <h3>Menu Example</h3>

      <asp:menu id="NavigationMenu"
        staticdisplaylevels="2"
        staticsubmenuindent="10" 
        orientation="Vertical"
        ScrollDownImageUrl="Images\ScrollDownImage.jpg"
        ScrollDownText="Down"
        ScrollUpImageUrl="Images\ScrollUpImage.jpg"
        ScrollUpText="Up" 
        runat="server">
        
        <dynamicmenustyle Height="50"/>
      
        <items>
          <asp:menuitem text="Home">
            <asp:menuitem text="Category 1">
              <asp:menuitem text="Item 1"/>
              <asp:menuitem text="Item 2"/>
              <asp:menuitem text="Item 3"/>
              <asp:menuitem text="Item 4"/>
              <asp:menuitem text="Item 5"/>
              <asp:menuitem text="Item 6"/>
              <asp:menuitem text="Item 7"/>
              <asp:menuitem text="Item 8"/>
              <asp:menuitem text="Item 9"/>
              <asp:menuitem text="Item 10"/>
            </asp:menuitem>
          </asp:menuitem>
        </items>
      
      </asp:menu>

    </form>
  </body>
</html>

<%@ Page Language="VB" %>

<!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 runat="server">
    <title>Menu Example</title>
</head>
<body>
    <form id="form1" runat="server">
    
      <h3>Menu Example</h3>

      <asp:menu id="NavigationMenu"
        staticdisplaylevels="2"
        staticsubmenuindent="10" 
        orientation="Vertical"
        ScrollDownImageUrl="Images\ScrollDownImage.jpg"
        ScrollDownText="Down"
        ScrollUpImageUrl="Images\ScrollUpImage.jpg"
        ScrollUpText="Up" 
        runat="server">
        
        <dynamicmenustyle Height="50"/>
      
        <items>
          <asp:menuitem text="Home">
            <asp:menuitem text="Category 1">
              <asp:menuitem text="Item 1"/>
              <asp:menuitem text="Item 2"/>
              <asp:menuitem text="Item 3"/>
              <asp:menuitem text="Item 4"/>
              <asp:menuitem text="Item 5"/>
              <asp:menuitem text="Item 6"/>
              <asp:menuitem text="Item 7"/>
              <asp:menuitem text="Item 8"/>
              <asp:menuitem text="Item 9"/>
              <asp:menuitem text="Item 10"/>
            </asp:menuitem>
          </asp:menuitem>
        </items>
      
      </asp:menu>

    </form>
  </body>
</html>

Commenti

Questa proprietà non è supportata nella modalità di rendering .NET 4.0. Se questa proprietà è necessaria, è possibile impostare il menu sulla modalità di rendering .NET 3.5 aggiungendo quanto segue nel codice della pagina:

menuInstance.RenderingCompatibility = new Version(3, 5);  

Quando una voce di menu dinamica contiene elementi aggiuntivi nella parte inferiore del menu, viene visualizzata un'immagine per indicare che l'utente può scorrere verso il basso per visualizzare voci di menu aggiuntive. Utilizzare la proprietà per specificare il ScrollDownText testo alternativo per questa immagine. Il testo specificato fornisce dispositivi di tecnologia assistive con una descrizione dell'immagine che può essere usata per rendere il controllo più accessibile.

Il valore di questa proprietà, quando impostato, può essere salvato automaticamente in un file di risorse usando uno strumento di progettazione. Per altre informazioni, vedere LocalizableAttributee Globalizzazione e Localizzazione.

Si applica a

Vedi anche