SiteMapPath.PathDirection Propriedade

Definição

Obtém ou define a ordem em que os nós do caminho de navegação são renderizados.Gets or sets the order that the navigation path nodes are rendered in.

public:
 virtual property System::Web::UI::WebControls::PathDirection PathDirection { System::Web::UI::WebControls::PathDirection get(); void set(System::Web::UI::WebControls::PathDirection value); };
public virtual System.Web.UI.WebControls.PathDirection PathDirection { get; set; }
member this.PathDirection : System.Web.UI.WebControls.PathDirection with get, set
Public Overridable Property PathDirection As PathDirection

Valor da propriedade

PathDirection

Um PathDirection que indica a ordem hierárquica na qual os nós de navegação são renderizados.A PathDirection that indicates the hierarchical order that navigation nodes are rendered in. O padrão é RootToCurrent , que indica que os nós são renderizados em ordem hierárquica do nó mais alto para o nó atual, da esquerda para a direita.The default is RootToCurrent, which indicates that the nodes are rendered in hierarchical order from the top-most node to the current node, from left to right.

Exceções

O valor de PathDirection não é uma das enumerações de base PathDirection.The value for PathDirection is not one of the base PathDirection enumerations.

Exemplos

O exemplo de código a seguir demonstra como definir declarativamente a PathDirection propriedade de um SiteMapPath em uma página Web Forms.The following code example demonstrates how to declaratively set the PathDirection property of a SiteMapPath in a Web Forms page.

<%@ 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>
        <title>Catalog</title>
    </head>
    <body>
        <form id="Form1" method="post" runat="server">
            <p><asp:SiteMapPath runat="server" ID="SiteMapPath1"
                    RootNodeStyle-Font-Bold="true"
                    RootNodeStyle-Font-Names="Arial Black"
                    RootNodeStyle-Font-Italic="True"
                    RootNodeStyle-ForeColor="Green"
                    CurrentNodeStyle-ForeColor="Orange"
                    PathSeparator="<::>"
                    PathDirection="CurrentToRoot"
                    RenderCurrentNodeAsLink="false"
                    ShowToolTips="false"/></p>
        </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>
        <title>Catalog</title>
    </head>
    <body>
        <form id="Form1" method="post" runat="server">
            <p><asp:SiteMapPath runat="server" ID="SiteMapPath1"
                    RootNodeStyle-Font-Bold="true"
                    RootNodeStyle-Font-Names="Arial Black"
                    RootNodeStyle-Font-Italic="True"
                    RootNodeStyle-ForeColor="Green"
                    CurrentNodeStyle-ForeColor="Orange"
                    PathSeparator="<::>"
                    PathDirection="CurrentToRoot"
                    RenderCurrentNodeAsLink="false"
                    ShowToolTips="false"/></p>
        </form>
    </body>
</html>

Comentários

Defina PathDirection como RootToCurrent se desejar exibir o caminho de navegação da esquerda para a direita; o caminho de navegação aparecerá como uma progressão da esquerda para a direita dos nós do mapa do site.Set PathDirection to RootToCurrent if you want to display the navigation path from left to right; the navigation path appears as a progression from left to right of site map nodes. Em outras palavras, o nó raiz está na posição mais à esquerda, cada nó subsequente está na próxima posição à direita e o nó atual está na posição mais à direita.In other words, the root node is at the leftmost position, each subsequent node is in the next position to the right, and the current node is in the rightmost position.

Defina PathDirection como CurrentToRoot se desejar exibir o caminho de navegação da direita para a esquerda.Set PathDirection to CurrentToRoot if you want to display the navigation path from right to left. Em outras palavras, a ordem do nó é revertida para que o nó raiz seja exibido na posição mais à direita e o nó atual seja exibido na posição mais à esquerda.In other words, the node order is reversed so that the root node displays at the rightmost position and the current node displays at the leftmost position. Embora não seja tão comum, essa ordenação pode ser usada para localizar Web Forms páginas e o SiteMapPath controle de idiomas que lêem da direita para a esquerda.While not as common, this ordering can be used for localizing Web Forms pages and the SiteMapPath control for languages that read from right to left.

O valor dessa propriedade é armazenado em estado de exibição.The value of this property is stored in view state.

Aplica-se a

Confira também