ContextNodeBase オブジェクトの位置とサイズを取得します。
名前空間 : System.Windows.Ink.AnalysisCore
アセンブリ : IACore (IACore.dll 内)
構文
'宣言
Public ReadOnly Property Location As AnalysisRegionBase
'使用
Dim instance As ContextNodeBase
Dim value As AnalysisRegionBase
value = instance.Location
public AnalysisRegionBase Location { get; }
public:
property AnalysisRegionBase^ Location {
AnalysisRegionBase^ get ();
}
/** @property */
public AnalysisRegionBase get_Location()
public function get Location () : AnalysisRegionBase
プロパティ値
型 : System.Windows.Ink.AnalysisCore.AnalysisRegionBase
ContextNodeBase オブジェクトの位置とサイズ。
解説
コンテナ ノードの位置は、すべてのリーフの位置を結合することにより決定されます。インク リーフ ノードの位置は、すべてのストロークの位置の結合を調べることにより決定されます。インク以外のリーフ ノードの位置は、それらのノードに対する最初のユーザー設定により決定されます。
例
この例では、currentNode という名前の ContextNodeBase の周りに青色のボックスを描画します。そのストロークは、theNotePanel という名前の Panel に描画されています。
' Convert bounds to pixels
Dim panelGraphics As Graphics = Me.theNotesPanel.CreateGraphics()
Dim nodeBounds() As Integer = currentNode.Location.GetBounds()
Dim upperLeft As New Point(nodeBounds(0), nodeBounds(1))
Dim lowerRight As New Point(nodeBounds(2), nodeBounds(3))
Me.theInkCollector.Renderer.InkSpaceToPixel(panelGraphics, upperLeft)
Me.theInkCollector.Renderer.InkSpaceToPixel(panelGraphics, lowerRight)
' Draw rectangle
panelGraphics.DrawRectangle(New Pen(Color.Blue), upperLeft.X, upperLeft.Y, lowerRight.X - upperLeft.X, lowerRight.Y - upperLeft.Y)
panelGraphics.Dispose()
// Convert bounds to pixels
Graphics panelGraphics = this.theNotesPanel.CreateGraphics();
int[] nodeBounds = currentNode.Location.GetBounds();
Point upperLeft = new Point(nodeBounds[0], nodeBounds[1]);
Point lowerRight = new Point(nodeBounds[2], nodeBounds[3]);
this.theInkCollector.Renderer.InkSpaceToPixel(panelGraphics, ref upperLeft);
this.theInkCollector.Renderer.InkSpaceToPixel(panelGraphics, ref lowerRight);
// Draw rectangle
panelGraphics.DrawRectangle(new Pen(Color.Blue),
upperLeft.X, upperLeft.Y, lowerRight.X - upperLeft.X,
lowerRight.Y - upperLeft.Y);
panelGraphics.Dispose();
プラットフォーム
Windows Vista, Windows XP SP2, Windows Server 2003
.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。
バージョン情報
.NET Framework
サポート対象 : 3.0
参照
参照
System.Windows.Ink.AnalysisCore 名前空間
ContextNodeBase.Location