InkOverlaySelectionMovedEventArgs.OldSelectionBoundingRect 속성
업데이트: 2007년 11월
선택된 Strokes 컬렉션의 경계 상자를 SelectionMoved 이벤트가 발생하기 전의 상태로 가져옵니다.
네임스페이스: Microsoft.Ink
어셈블리: Microsoft.Ink(Microsoft.Ink.dll)
구문
‘선언
Public ReadOnly Property OldSelectionBoundingRect As Rectangle
‘사용 방법
Dim instance As InkOverlaySelectionMovedEventArgs
Dim value As Rectangle
value = instance.OldSelectionBoundingRect
public Rectangle OldSelectionBoundingRect { get; }
public:
property Rectangle OldSelectionBoundingRect {
Rectangle get ();
}
/** @property */
public Rectangle get_OldSelectionBoundingRect()
public function get OldSelectionBoundingRect () : Rectangle
속성 값
형식: System.Drawing.Rectangle
선택된 Strokes 컬렉션의 경계 상자(SelectionMoved 이벤트가 발생하기 전의 상태)입니다.
설명
OldSelectionBoundingRect 속성은 SelectionMoved 이벤트가 발생하기 전에 선택된 Strokes 컬렉션이 있던 위치를 가져옵니다.
예제
이 예제에서 SelectionMoved 이벤트 처리기는 이동한 후의 선택 영역을 조사합니다. 선택된 Strokes 컬렉션이 이동하여 선택 영역 중 하나가 창의 왼쪽이나 위쪽 경계를 벗어나면 선택 영역이 원래 위치로 다시 이동합니다.
Private Sub mInkObject_SelectionMoved(ByVal sender As Object, ByVal e As InkOverlaySelectionMovedEventArgs)
' mInkObject can be InkOverlay or InkPicture
Dim newBounds As Rectangle = mInkObject.Selection.GetBoundingBox()
' Check if we have gone off the left or top sides of the window.
If (newBounds.Left < 0 Or newBounds.Top < 0) Then
' Move to back to original spot
mInkObject.Selection.Move(e.OldSelectionBoundingRect.Left - newBounds.Left, _
e.OldSelectionBoundingRect.Top - newBounds.Top)
' Trick to insure that selection handles are updated
mInkObject.Selection = mInkObject.Selection
End If
End Sub
private void mInkObject_SelectionMoved(object sender, InkOverlaySelectionMovedEventArgs e)
{
// mInkObject can be InkOverlay or InkPicture
Rectangle newBounds = mInkObject.Selection.GetBoundingBox();
// Check if we have gone off the left or top sides of the window.
if (newBounds.Left < 0 || newBounds.Top < 0)
{
// Move to back to original spot
mInkObject.Selection.Move(e.OldSelectionBoundingRect.Left - newBounds.Left,
e.OldSelectionBoundingRect.Top - newBounds.Top);
// Trick to insure that selection handles are updated
mInkObject.Selection = mInkObject.Selection;
}
}
플랫폼
Windows Vista
.NET Framework 및 .NET Compact Framework에서 모든 플랫폼의 전체 버전을 지원하지는 않습니다. 지원되는 버전의 목록을 보려면 .NET Framework 시스템 요구 사항을 참조하십시오.
버전 정보
.NET Framework
3.0에서 지원
참고 항목
참조
InkOverlaySelectionMovedEventArgs 클래스