次の方法で共有


ContextNodeBase.ParentNode プロパティ

コンテキスト ノード ツリー内の ContextNodeBase の親ノードを取得します。

名前空間 :  System.Windows.Ink.AnalysisCore
アセンブリ :  IACore (IACore.dll 内)

構文

'宣言
Public ReadOnly Property ParentNode As ContextNodeBase
'使用
Dim instance As ContextNodeBase
Dim value As ContextNodeBase

value = instance.ParentNode
public ContextNodeBase ParentNode { get; }
public:
property ContextNodeBase^ ParentNode {
    ContextNodeBase^ get ();
}
/** @property */
public ContextNodeBase get_ParentNode()
public function get ParentNode () : ContextNodeBase

プロパティ値

型 : System.Windows.Ink.AnalysisCore.ContextNodeBase
コンテキスト ノード ツリー内の ContextNodeBase の親ノード。

解説

これが RootNode の場合、nullnull 参照 (Visual Basic では Nothing) を返します。

この例では、theTreeView という名前のSystem.Windows.Forms.TreeView によってツリー ノードをコンテキスト ノードに対応付ける Hashtable を使用して見つかった、ContextNodeBase を使用します。親ノードが見つかったら、MarkNodeAsRed というメソッドが呼び出されてノードのストロークが赤色に変更されます。

Dim selectedNode As ContextNodeBase = CType(Me.theTreeView.SelectedNode.Tag, ContextNodeBase)
Dim parentNode As ContextNodeBase = selectedNode.ParentNode
If Not (parentNode Is Nothing) Then
    MarkNodeAsRed(parentNode)
End If
ContextNodeBase selectedNode = (ContextNodeBase)this.theTreeView.SelectedNode.Tag;
ContextNodeBase parentNode = selectedNode.ParentNode;
if (parentNode != null)
{
    MarkNodeAsRed(parentNode);
}

プラットフォーム

Windows Vista, Windows XP SP2, Windows Server 2003

.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。

バージョン情報

.NET Framework

サポート対象 : 3.0

参照

参照

ContextNodeBase クラス

ContextNodeBase メンバ

System.Windows.Ink.AnalysisCore 名前空間

ContextNodeBase.SubNodes