NavigationNode クラス
クライアント アプリケーションがリストを表示するかどうかの決定に使用できるフラグを指定する値を取得または設定します。
継承階層
System.Object
Microsoft.SharePoint.Client.ClientObject
Microsoft.SharePoint.Client.NavigationNode
名前空間: Microsoft.SharePoint.Client
アセンブリ: Microsoft.SharePoint.Client.Silverlight (Microsoft.SharePoint.Client.Silverlight.dll 内); Microsoft.SharePoint.Client.Phone (Microsoft.SharePoint.Client.Phone.dll 内) Microsoft.SharePoint.Client (Microsoft.SharePoint.Client.dll 内)
構文
'宣言
Public NotInheritable Class NavigationNode _
Inherits ClientObject
'使用
Dim instance As NavigationNode
public sealed class NavigationNode : ClientObject
例
次の例では、指定したサイトのサイド リンク バーの領域にノードを追加し、サイド リンク バーの現在のノードを表示します。
using System;
using Microsoft.SharePoint.Client;
namespace Microsoft.SDK.SharePointFoundation.Samples
{
class NavigationNodeExample
{
static void Main()
{
string siteUrl = "http://MyServer/sites/MySiteCollection";
ClientContext clientContext = new ClientContext(siteUrl);
Web site = clientContext.Web;
// Get the Quick Launch navigation node collection.
NavigationNodeCollection collQuickLaunchNode = site.Navigation.QuickLaunch;
// Set properties for a new navigation node.
NavigationNodeCreationInformation ciNavicationNode = new NavigationNodeCreationInformation();
ciNavicationNode.Title = "New Node";
ciNavicationNode.Url = "https://localhost";
// Create node as the last node in the collection.
ciNavicationNode.AsLastNode = true;
collQuickLaunchNode.Add(ciNavicationNode);
clientContext.Load(collQuickLaunchNode);
clientContext.ExecuteQuery();
Console.WriteLine("Current nodes:\n");
foreach (NavigationNode navNode in collQuickLaunchNode)
Console.WriteLine(navNode.Title);
}
}
}
スレッド セーフ
この型のパブリック static (Visual Basic のShared ) メンバーはいずれもスレッド セーフです。インスタンス メンバーはスレッド セーフになるという保証はありません。