다음을 통해 공유


ContextNodeBase.Location 속성

업데이트: 2007년 11월

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에서 지원

참고 항목

참조

ContextNodeBase 클래스

ContextNodeBase 멤버

System.Windows.Ink.AnalysisCore 네임스페이스

ContextNodeBase.Location

System.Windows.Ink.AnalysisCore.AnalysisRegionBase