Aracılığıyla paylaş


MenuItem.PopOutImageUrl Özellik

Tanım

Menü öğesinin dinamik bir alt menüsü olduğunu belirtmek için bir menü öğesinde görüntülenen görüntünün URL'sini alır veya ayarlar.

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

Özellik Değeri

Menü öğesinin dinamik bir alt menüsü olduğunu belirtmek için bir menü öğesinde görüntülenen görüntünün URL'si. Varsayılan, bu özelliğin ayarlanmadığını gösteren boş bir dizedir ("").

Örnekler

Aşağıdaki örnekte, menü öğesinin PopOutImageUrl dinamik bir alt menüsü olduğunda menü öğesinde görüntülenecek özel bir görüntü belirtmek için özelliğinin nasıl kullanılacağı gösterilmektedir.


<%@ 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>MenuItem Declarative Example</title>
</head>
<body>
    <form id="form1" runat="server">
    
      <h3>MenuItem Declarative Example</h3>
    
      <!-- Use declarative syntax to create the   -->
      <!-- menu structure. Create submenu items   -->
      <!-- by nesting them within parent menu     -->
      <!-- items.                                 -->
      <asp:menu id="NavigationMenu"
        staticdisplaylevels="1"
        staticsubmenuindent="10" 
        orientation="Vertical" 
        target="_blank"  
        runat="server">

        <items>
          <asp:menuitem navigateurl="Home.aspx" 
            text="Home"
            imageurl="Images\Home.gif"
            popoutimageurl="Images\Popout.jpg"   
            tooltip="Home">
            <asp:menuitem navigateurl="Music.aspx"
              text="Music"
              popoutimageurl="Images\Popout.jpg"
              tooltip="Music">
              <asp:menuitem navigateurl="Classical.aspx" 
                text="Classical"
                separatorimageurl="Images\Separator.jpg"
                tooltip="Classical"/>
              <asp:menuitem navigateurl="Rock.aspx"
                text="Rock"
                separatorimageurl="Images\Separator.jpg"
                tooltip="Rock"/>
              <asp:menuitem navigateurl="Jazz.aspx"
                text="Jazz"
                separatorimageurl="Images\Separator.jpg"
                tooltip="Jazz"/>
            </asp:menuitem>
            <asp:menuitem navigateurl="Movies.aspx"
              text="Movies"
              popoutimageurl="Images\Popout.jpg"              
              tooltip="Movies">
              <asp:menuitem navigateurl="Action.aspx"
                text="Action"
                separatorimageurl="Images\Separator.jpg"
                tooltip="Action"/>
              <asp:menuitem navigateurl="Drama.aspx"
                text="Drama"
                separatorimageurl="Images\Separator.jpg"
                tooltip="Drama"/>
              <asp:menuitem navigateurl="Musical.aspx"
                text="Musical"
                separatorimageurl="Images\Separator.jpg"
                tooltip="Musical"/>
            </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>MenuItem Declarative Example</title>
</head>
<body>
    <form id="form1" runat="server">
    
      <h3>MenuItem Declarative Example</h3>
    
      <!-- Use declarative syntax to create the   -->
      <!-- menu structure. Create submenu items   -->
      <!-- by nesting them within parent menu     -->
      <!-- items.                                 -->
      <asp:menu id="NavigationMenu"
        staticdisplaylevels="1"
        staticsubmenuindent="10" 
        orientation="Vertical" 
        target="_blank"  
        runat="server">

        <items>
          <asp:menuitem navigateurl="Home.aspx" 
            text="Home"
            imageurl="Images\Home.gif"
            popoutimageurl="Images\Popout.jpg"   
            tooltip="Home">
            <asp:menuitem navigateurl="Music.aspx"
              text="Music"
              popoutimageurl="Images\Popout.jpg"
              tooltip="Music">
              <asp:menuitem navigateurl="Classical.aspx" 
                text="Classical"
                separatorimageurl="Images\Separator.jpg"
                tooltip="Classical"/>
              <asp:menuitem navigateurl="Rock.aspx"
                text="Rock"
                separatorimageurl="Images\Separator.jpg"
                tooltip="Rock"/>
              <asp:menuitem navigateurl="Jazz.aspx"
                text="Jazz"
                separatorimageurl="Images\Separator.jpg"
                tooltip="Jazz"/>
            </asp:menuitem>
            <asp:menuitem navigateurl="Movies.aspx"
              text="Movies"
              popoutimageurl="Images\Popout.jpg"              
              tooltip="Movies">
              <asp:menuitem navigateurl="Action.aspx"
                text="Action"
                separatorimageurl="Images\Separator.jpg"
                tooltip="Action"/>
              <asp:menuitem navigateurl="Drama.aspx"
                text="Drama"
                separatorimageurl="Images\Separator.jpg"
                tooltip="Drama"/>
              <asp:menuitem navigateurl="Musical.aspx"
                text="Musical"
                separatorimageurl="Images\Separator.jpg"
                tooltip="Musical"/>
            </asp:menuitem>
          </asp:menuitem>
        </items>
      
      </asp:menu>

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

Açıklamalar

olarak ayarlandıysa System.Web.UI.WebControls.MenuRenderingModeListveya olarak ve PagesSection.ControlRenderingCompatibilityVersionDefault veya daha sonra olarak ayarlandıysa System.Web.UI.WebControls.MenuRenderingMode4.0, bu özelliğin hiçbir etkisi yoktur. Menu.DynamicEnableDefaultPopOutImage Bu özellik yerine özelliğini veya Menu.StaticEnableDefaultPopOutImage özelliğini kullanın.

olarak ayarlandıysa System.Web.UI.WebControls.MenuRenderingModeTableveya olarak ve olarak ayarlandıysa 3.5System.Web.UI.WebControls.MenuRenderingModeDefault, PagesSection.ControlRenderingCompatibilityVersion menü öğesinin dinamik bir alt menüsü olduğunu belirtmek üzere menü öğesinde görüntülenen özel bir görüntüyü belirtmek için bu özelliği kullanın. İstemcinin tarayıcısı bu biçimi desteklediği sürece bu görüntü herhangi bir dosya biçiminde (.jpg, .gif, .bmpvb.) olabilir.

Uyarı

Bu özelliğin ayarlanması ve Menu.StaticPopOutImageUrl özellikleri tarafından Menu.DynamicPopOutImageUrl belirtilen görüntüyü geçersiz kılar.

Bu özelliği boş bir dizeye ayarlayarak ve özelliğini falseolarak ayarlayarak StaticEnableDefaultPopOutImage bu görüntüyü statik bir menüde de devre dışı bırakabilirsiniz. Benzer şekilde, bu özelliği boş bir dizeye ayarlayarak ve özelliğini falseolarak ayarlayarak DynamicEnableDefaultPopOutImage dinamik bir menüde bu görüntüyü devre dışı bırakabilirsiniz.

Şunlara uygulanır

Ayrıca bkz.