SiteMapNodeItem.ItemType プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > SiteMapNodeItem.ItemType プロパティの意味・解説 

SiteMapNodeItem.ItemType プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

SiteMapNodeItem の機能上の型を取得します

名前空間: System.Web.UI.WebControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public Overridable ReadOnly
 Property ItemType As SiteMapNodeItemType
Dim instance As SiteMapNodeItem
Dim value As SiteMapNodeItemType

value = instance.ItemType
public virtual SiteMapNodeItemType ItemType { get;
 }
public:
virtual property SiteMapNodeItemType ItemType {
    SiteMapNodeItemType get ();
}
/** @property */
public SiteMapNodeItemType get_ItemType ()
public function get ItemType
 () : SiteMapNodeItemType

プロパティ
ナビゲーション パス階層におけるノード アイテム機能的な役割を示す、SiteMapNodeItemType 列挙体のメンバ

解説解説

型が PathSeparator の SiteMapNodeItem オブジェクトは、対応する SiteMapNode に関連付けられません。

使用例使用例

ItemType プロパティ使用して SiteMapNodeItem の型を確認する方法次のコード例示します。この例では、InitializeItem メソッド処理する唯一のノードの型は CurrentNode 型です。このコード例は、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
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SiteMapNodeItem クラス
SiteMapNodeItem メンバ
System.Web.UI.WebControls 名前空間
SiteMapNodeItemType
その他の技術情報
ASP.NET サイト ナビゲーション


このページでは「.NET Framework クラス ライブラリ リファレンス」からSiteMapNodeItem.ItemType プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からSiteMapNodeItem.ItemType プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からSiteMapNodeItem.ItemType プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

SiteMapNodeItem.ItemType プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



SiteMapNodeItem.ItemType プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS