SiteMapNodeItem.SiteMapNode プロパティ
メモ : このプロパティは、.NET Framework version 2.0 で新しく追加されたものです。
この SiteMapNodeItem が表す SiteMapNode オブジェクトを取得または設定します。
名前空間: System.Web.UI.WebControls
アセンブリ: System.Web (system.web.dll 内)
構文
Dim instance As SiteMapNodeItem Dim value As SiteMapNode value = instance.SiteMapNode instance.SiteMapNode = value
public: virtual property SiteMapNode^ SiteMapNode { SiteMapNode^ get (); void set (SiteMapNode^ value); }
/** @property */ public SiteMapNode get_SiteMapNode () /** @property */ public void set_SiteMapNode (SiteMapNode value)
public function get SiteMapNode () : SiteMapNode public function set SiteMapNode (value : SiteMapNode)
プロパティ値
SiteMapPath コントロールが、サイト ナビゲーション ユーザー インターフェイスを表示するために使用する SiteMapNode オブジェクト。

SiteMapNode プロパティは、SiteMapNodeItem が関連付けられている SiteMapNode を取得または設定します。型が PathSeparator の SiteMapNodeItem オブジェクトは、対応する SiteMapNode オブジェクトに関連付けられません。

SiteMapNode プロパティを取得し、SiteMapNode オブジェクトの Title プロパティおよび Url プロパティにアクセスする方法を次のコード例に示します。このコード例は SiteMapPath クラスのトピックで取り上げているコード例の一部分です。
' Override the InitializeItem method to add a PathSeparator ' and DropDownList to the current node. Protected Overrides Sub InitializeItem(item As SiteMapNodeItem) ' The only node that must be handled is the CurrentNode. If item.ItemType = SiteMapNodeItemType.Current Then Dim hLink As New HyperLink() ' No Theming for the HyperLink. hLink.EnableTheming = False ' Enable the link of the SiteMapPath is enabled. hLink.Enabled = Me.Enabled ' Set the properties of the HyperLink to ' match those of the corresponding SiteMapNode. hLink.NavigateUrl = item.SiteMapNode.Url hLink.Text = item.SiteMapNode.Title If ShowToolTips Then hLink.ToolTip = item.SiteMapNode.Description End If ' Apply styles or templates to the HyperLink here. ' ... ' ... ' Add the item to the Controls collection. item.Controls.Add(hLink) AddDropDownListAfterCurrentNode(item) Else MyBase.InitializeItem(item) End If End Sub 'InitializeItem
// Override the InitializeItem method to add a PathSeparator // and DropDownList to the current node. protected override void InitializeItem(SiteMapNodeItem item) { // The only node that must be handled is the CurrentNode. if (item.ItemType == SiteMapNodeItemType.Current) { HyperLink hLink = new HyperLink(); // No Theming for the HyperLink. hLink.EnableTheming = false; // Enable the link of the SiteMapPath is enabled. hLink.Enabled = this.Enabled; // Set the properties of the HyperLink to // match those of the corresponding SiteMapNode. hLink.NavigateUrl = item.SiteMapNode.Url; hLink.Text = item.SiteMapNode.Title; if (ShowToolTips) { hLink.ToolTip = item.SiteMapNode.Description; } // Apply styles or templates to the HyperLink here. // ... // ... // Add the item to the Controls collection. item.Controls.Add(hLink); AddDropDownListAfterCurrentNode(item); } else { base.InitializeItem(item); } }
// Override the InitializeItem method to add a PathSeparator // and DropDownList to the current node. protected void InitializeItem(SiteMapNodeItem item) { // The only node that must be handled is the CurrentNode. if (item.get_ItemType().Equals(SiteMapNodeItemType.Current)) { HyperLink hLink = new HyperLink(); // No Theming for the HyperLink. hLink.set_EnableTheming(false); // Enable the link of the SiteMapPath is enabled. hLink.set_Enabled(this.get_Enabled()); // Set the properties of the HyperLink to // match those of the corresponding SiteMapNode. hLink.set_NavigateUrl(item.get_SiteMapNode().get_Url()); hLink.set_Text(item.get_SiteMapNode().get_Title()); if (get_ShowToolTips()) { hLink.set_ToolTip(item.get_SiteMapNode().get_Description()); } // Apply styles or templates to the HyperLink here. // ... // ... // Add the item to the Controls collection. item.get_Controls().Add(hLink); AddDropDownListAfterCurrentNode(item); } else { super.InitializeItem(item); } } //InitializeItem

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からSiteMapNodeItem.SiteMapNode プロパティを検索する場合は、下記のリンクをクリックしてください。

- SiteMapNodeItem.SiteMapNode プロパティのページへのリンク