SiteMapPath.NodeTemplate プロパティ
アセンブリ: System.Web (system.web.dll 内)

<TemplateContainerAttribute(GetType(SiteMapNodeItem))> _ Public Overridable Property NodeTemplate As ITemplate
Dim instance As SiteMapPath Dim value As ITemplate value = instance.NodeTemplate instance.NodeTemplate = value
[TemplateContainerAttribute(typeof(SiteMapNodeItem))] public virtual ITemplate NodeTemplate { get; set; }
[TemplateContainerAttribute(typeof(SiteMapNodeItem))] public: virtual property ITemplate^ NodeTemplate { ITemplate^ get (); void set (ITemplate^ value); }
/** @property */ public ITemplate get_NodeTemplate () /** @property */ public void set_NodeTemplate (ITemplate value)
public function get NodeTemplate () : ITemplate public function set NodeTemplate (value : ITemplate)
ナビゲーション パスの各ノードのカスタム コンテンツを表示する、InstantiateIn メソッドを実装した ITemplate オブジェクト。

ナビゲーション パスのノードすべてのユーザー インターフェイス要素として、Image または Label などの他のコントロールを使用するには、NodeTemplate に ITemplate オブジェクトを設定します。
NodeTemplate プロパティを設定すると、そのテンプレートによって、表示されるナビゲーション ノードのテキストと適用される NodeStyle がオーバーライドされます。現在のノードとルート ノードに CurrentNodeTemplate か RootNodeTemplate を設定すると、NodeTemplate はこれらのテンプレートでオーバーライドされます。
NodeTemplate プロパティは、任意の Web サーバー コントロールに宣言によって設定できます。ASP.NET インフラストラクチャが、必要な手順を実行して、Web サーバー コントロールを ITemplate オブジェクトとしてラップします。ただし、Web サーバー コントロールは ITemplate インターフェイスを実装しません。このため、ITemplate プロパティをプログラムによって操作する場合は、テンプレート コードの ITemplate ラッパーを記述する必要があります。その後、RootNodeTemplate プロパティが ITemplate ラッパーのインスタンスに設定されます。

NodeTemplate を指定した場合に、ルート ノードや現在のノードに定義された特別なスタイルを含め、すべてのノードに定義されたスタイルをオーバーライドする方法を次のコード例に示します。
<%@ Page Language="VB" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <SCRIPT runat="server"> </SCRIPT> <HTML> <BODY> <FORM ID="Form1" runat="server"> <!-- The following example demonstrates some of the orders of precedence when applying styles and templates to functional nodes of a SiteMapPath. A NodeStyle, RootNodeStyle, and CurrentNodeStyle are all defined. However, so is a NodeTemplate. The template is applied to all nodes, and the styles ignored. --> <asp:SiteMapPath ID="SiteMapPath1" runat="server" RenderCurrentNodeAsLink="true" NodeStyle-Font-Name="Franklin Gothic Medium" NodeStyle-Font-Underline="true" NodeStyle-Font-Bold="true" RootNodeStyle-Font-Name="Symbol" RootNodeStyle-Font-Bold="false" CurrentNodeStyle-Font-Name="Verdana" CurrentNodeStyle-Font-Size="10pt" CurrentNodeStyle-Font-Bold="true" CurrentNodeStyle-ForeColor="red" CurrentNodeStyle-Font-Underline="false" HoverNodeStyle-ForeColor="blue" HoverNodeStyle-Font-Underline="true"> <NODETEMPLATE> <asp:CheckBox id="CheckBox1" runat="server" Checked=true /> <asp:TextBox id="TextBox1" runat="server" Text="Declarative template" /> </NODETEMPLATE> </asp:SiteMapPath> </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"> <SCRIPT runat="server"> </SCRIPT> <HTML> <BODY> <FORM ID="Form1" runat="server"> <!-- The following example demonstrates some of the orders of precedence when applying styles and templates to functional nodes of a SiteMapPath. A NodeStyle, RootNodeStyle, and CurrentNodeStyle are all defined. However, so is a NodeTemplate. The template is applied to all nodes, and the styles ignored. --> <asp:SiteMapPath ID="SiteMapPath1" runat="server" RenderCurrentNodeAsLink="true" NodeStyle-Font-Name="Franklin Gothic Medium" NodeStyle-Font-Underline="true" NodeStyle-Font-Bold="true" RootNodeStyle-Font-Name="Symbol" RootNodeStyle-Font-Bold="false" CurrentNodeStyle-Font-Name="Verdana" CurrentNodeStyle-Font-Size="10pt" CurrentNodeStyle-Font-Bold="true" CurrentNodeStyle-ForeColor="red" CurrentNodeStyle-Font-Underline="false" HoverNodeStyle-ForeColor="blue" HoverNodeStyle-Font-Underline="true"> <NODETEMPLATE> <asp:CheckBox id="CheckBox1" runat="server" Checked=true /> <asp:TextBox id="TextBox1" runat="server" Text="Declarative template" /> </NODETEMPLATE> </asp:SiteMapPath> </FORM> </BODY> </HTML>
<%@ Page Language="VJ#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <SCRIPT runat="server"> </SCRIPT> <HTML> <BODY> <FORM ID="Form1" runat="server"> <!-- The following example demonstrates some of the orders of precedence when applying styles and templates to functional nodes of a SiteMapPath. A NodeStyle, RootNodeStyle, and CurrentNodeStyle are all defined. However, so is a NodeTemplate. The template is applied to all nodes, and the styles ignored. --> <asp:SiteMapPath ID="SiteMapPath1" runat="server" RenderCurrentNodeAsLink="true" NodeStyle-Font-Name="Franklin Gothic Medium" NodeStyle-Font-Underline="true" NodeStyle-Font-Bold="true" RootNodeStyle-Font-Name="Symbol" RootNodeStyle-Font-Bold="false" CurrentNodeStyle-Font-Name="Verdana" CurrentNodeStyle-Font-Size="10pt" CurrentNodeStyle-Font-Bold="true" CurrentNodeStyle-ForeColor="red" CurrentNodeStyle-Font-Underline="false" HoverNodeStyle-ForeColor="blue" HoverNodeStyle-Font-Underline="true"> <NODETEMPLATE> <asp:CheckBox id="CheckBox1" runat="server" Checked=true /> <asp:TextBox id="TextBox1" runat="server" Text="Declarative template" /> </NODETEMPLATE> </asp:SiteMapPath> </FORM> </BODY> </HTML>

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


SiteMapPath クラス
SiteMapPath メンバ
System.Web.UI.WebControls 名前空間
その他の技術情報
ASP.NET サイト ナビゲーション
SiteMapPath Web サーバー コントロールの概要
Weblioに収録されているすべての辞書からSiteMapPath.NodeTemplate プロパティを検索する場合は、下記のリンクをクリックしてください。

- SiteMapPath.NodeTemplate プロパティのページへのリンク