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

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

SiteMapPath.PathSeparator プロパティ

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

表示されナビゲーション パスの各 SiteMapPath ノード区切る文字列取得または設定します

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

<LocalizableAttribute(True)> _
Public Overridable Property
 PathSeparator As String
Dim instance As SiteMapPath
Dim value As String

value = instance.PathSeparator

instance.PathSeparator = value
[LocalizableAttribute(true)] 
public virtual string PathSeparator { get;
 set; }
[LocalizableAttribute(true)] 
public:
virtual property String^ PathSeparator {
    String^ get ();
    void set (String^ value);
}
/** @property */
public String get_PathSeparator ()

/** @property */
public void set_PathSeparator (String value)
public function get PathSeparator
 () : String

public function set PathSeparator
 (value : String)

プロパティ
ナビゲーション パスの各ノードデリミタを表す文字列。既定値は " > " です。これは左から右を指す文字であり、RootToCurrent に設定される既定の PathDirection に対応します

解説解説
使用例使用例

SiteMapPathPathSeparator プロパティ既定値以外の文字列設定する方法次の例に示します

<%@ 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">

    Private Sub Page_Load(sender As
 Object, e As EventArgs)
        ' Create the SiteMapPath control.
        Dim navpath As New
 SiteMapPath()

        ' Make the root node look unique.
        ' The Image that you can use in your Web page is an
        ' instance of the WebControls.Image class, not the
        ' Drawing.Image class.
        Dim rootNodeImage As New
 System.Web.UI.WebControls.Image()
        rootNodeImage.ImageUrl = "myimage.jpg"
        Dim rootNodeImageTemplate As New
 ImageTemplate()
        rootNodeImageTemplate.MyImage = rootNodeImage
        navpath.RootNodeTemplate = rootNodeImageTemplate

        ' Make the current node look unique.
        Dim currentNodeStyle As New
 Style()
        navpath.CurrentNodeStyle.ForeColor = System.Drawing.Color.AliceBlue
        navpath.CurrentNodeStyle.BackColor = System.Drawing.Color.Bisque

        ' Set the path separator to be something other
        ' than the default.
        navpath.PathSeparator = "::"

        PlaceHolder1.Controls.Add(navpath)
    End Sub ' Page_Load


    ' A simple Template class to wrap an image.
    Public Class ImageTemplate
      Implements ITemplate

        Private anImage As System.Web.UI.WebControls.Image
        Public Property MyImage As
 System.Web.UI.WebControls.Image
          Get
            return anImage
          End Get
          Set
            anImage = value
          End Set
        End Property ' MyImage

        Public Overridable Sub
 InstantiateIn(ByVal container As Control)
 Implements ITemplate.InstantiateIn
            container.Controls.Add(MyImage)
        End Sub ' InstantiateIn

    End Class ' ImageTemplate
</SCRIPT>

<HTML>
  <body MS_POSITIONING="GridLayout">
    <form id="Form1" method="post"
 runat="server">

      <asp:PlaceHolder id="PlaceHolder1" runat="server"></asp:PlaceHolder>

      <h1>About Our Company</h1>

      <p>Our company was founded in 1886.</p>

      <p>We use only the finest ingredients, organically grown fruits, and
      natural spices in our homemade pies. We use no artificial
 preservatives
      or coloring agents. We would not have
 it any other way!</p>

    </form>
  </body>
</HTML>
<%@ Page language="c#"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<SCRIPT runat="server">
    private void Page_Load(object sender, System.EventArgs
 e)
    {
        // Create the SiteMapPath control.
        SiteMapPath navpath = new SiteMapPath();

        // Make the root node look unique.
        // The Image that you can use in your Web page is an
        // instance of the WebControls.Image class, not the
        // Drawing.Image class.
        System.Web.UI.WebControls.Image rootNodeImage =
            new System.Web.UI.WebControls.Image();
        rootNodeImage.ImageUrl = "myimage.jpg";
        ImageTemplate rootNodeImageTemplate = new ImageTemplate();
        rootNodeImageTemplate.MyImage = rootNodeImage;
        navpath.RootNodeTemplate = rootNodeImageTemplate;

        // Make the current node look unique.
        Style currentNodeStyle = new Style();
        navpath.CurrentNodeStyle.ForeColor = System.Drawing.Color.AliceBlue;
        navpath.CurrentNodeStyle.BackColor = System.Drawing.Color.Bisque;

        // Set the path separator to be something other
        // than the default.
        navpath.PathSeparator = "::";

        PlaceHolder1.Controls.Add(navpath);
    }


    // A simple Template class to wrap an image.
    public class ImageTemplate : ITemplate
    {
        private System.Web.UI.WebControls.Image myImage;
        public System.Web.UI.WebControls.Image MyImage
        {
            get
            {
                return myImage;
            }
            set
            {
                myImage = value;
            }
        }
        public void InstantiateIn(Control container)
        {
            container.Controls.Add(MyImage);
        }
    }
</SCRIPT>

<HTML>
  <body MS_POSITIONING="GridLayout">
    <form id="Form1" method="post" runat="server">

      <asp:PlaceHolder id="PlaceHolder1" runat="server"></asp:PlaceHolder>

      <h1>About Our Company</h1>

      <p>Our company was founded in 1886.</p>

      <p>We use only the finest ingredients, organically grown fruits, and
      natural spices in our homemade pies. We use no artificial
 preservatives
      or coloring agents. We would not have it any other way!</p>

    </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">
    private void Page_Load(Object sender, System.EventArgs
 e)
    {
        // Create the SiteMapPath control.
        SiteMapPath navpath = new SiteMapPath();

        // Make the root node look unique.
        // The Image that you can use in your Web page is an
        // instance of the WebControls.Image class, not the
        // Drawing.Image class.
        System.Web.UI.WebControls.Image rootNodeImage = new System.Web.UI.WebControls.Image();

        rootNodeImage.set_ImageUrl("myimage.jpg");

        ImageTemplate rootNodeImageTemplate = new ImageTemplate();

        rootNodeImageTemplate.set_myImage(rootNodeImage);
        navpath.set_RootNodeTemplate(rootNodeImageTemplate);

        // Make the current node look unique.
        Style currentNodeStyle = new Style();

        navpath.get_CurrentNodeStyle().set_ForeColor(System.Drawing.Color.get_AliceBlue());
        navpath.get_CurrentNodeStyle().set_BackColor(System.Drawing.Color.get_Bisque());

        // Set the path separator to be something other
        // than the default.
        navpath.set_PathSeparator("---->");
        PlaceHolder1.get_Controls().Add(navpath);
    }


    // A simple Template class to wrap an image.
    public class ImageTemplate implements ITemplate
    {
        private System.Web.UI.WebControls.Image myImage;
        public System.Web.UI.WebControls.Image get_myImage()
        {
            return myImage;
        }


        public void set_myImage(System.Web.UI.WebControls.Image
 value)
        {
            myImage = value;
        }


        public void InstantiateIn(Control container)
        {
            container.get_Controls().Add(myImage);
        }
    }

</SCRIPT>

<HTML>
  <body MS_POSITIONING="GridLayout">
    <form id="Form1" method="post" runat="server">

      <asp:PlaceHolder id="PlaceHolder1" runat="server"></asp:PlaceHolder>

      <h1>About Our Company</h1>

      <p>Grandma Fanny founded our company in 1886.</p>

      <p>We use only the finest ingredients, organically grown fruits, and
      natural spices in our homemade pies. We use no artificial
 preservatives
      or coloring agents. Grandma Fanny would not have it any other way!</p>

    </form>
  </body>
</HTML>
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SiteMapPath クラス
SiteMapPath メンバ
System.Web.UI.WebControls 名前空間
PathSeparatorStyle
PathSeparatorTemplate
その他の技術情報
ASP.NET サイト ナビゲーション
SiteMapPath Web サーバー コントロール概要


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

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

辞書ショートカット

すべての辞書の索引

「SiteMapPath.PathSeparator プロパティ」の関連用語

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

   

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



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

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

©2025 GRAS Group, Inc.RSS