업데이트: 2007년 11월
SelectionMoving 이벤트가 발생한 후 선택 영역이 이동하는 대상 사각형을 가져옵니다.
네임스페이스: Microsoft.Ink
어셈블리: Microsoft.Ink(Microsoft.Ink.dll)
구문
‘선언
Public ReadOnly Property NewPixelRect As Rectangle
‘사용 방법
Dim instance As InkOverlaySelectionMovingEventArgs
Dim value As Rectangle
value = instance.NewPixelRect
public Rectangle NewPixelRect { get; }
public:
property Rectangle NewPixelRect {
Rectangle get ();
}
/** @property */
public Rectangle get_NewPixelRect()
public function get NewPixelRect () : Rectangle
속성 값
형식: System.Drawing.Rectangle
SelectionMoving 이벤트가 발생한 후 선택 영역이 이동하는 대상 사각형입니다.
예제
이 예제에서 SelectionMoving 이벤트 처리기는 이동하기 전의 선택 영역을 조사합니다. 선택 영역이 이동하여 창의 경계를 벗어나면 이벤트 처리기에서 선택된 각 Stroke 개체의 Color 속성을 변경하여 선택 영역을 빨간색으로 바꿉니다.
Private Sub mInkObject_SelectionMoving(ByVal sender As Object, ByVal e As InkOverlaySelectionMovingEventArgs)
If e.NewPixelRect.Left < 0 Or e.NewPixelRect.Top < 0 Or _
e.NewPixelRect.Right > mInkObject.AttachedControl.ClientRectangle.Width Or _
e.NewPixelRect.Bottom > mInkObject.AttachedControl.ClientRectangle.Height Then
For Each stroke As Stroke In mInkObject.Selection
' change the stroke color
stroke.DrawingAttributes.Color = Color.Red
Next
End If
End Sub
private void mInkObject_SelectionMoving(object sender, InkOverlaySelectionMovingEventArgs e)
{
if (e.NewPixelRect.Left < 0 || e.NewPixelRect.Top < 0 ||
e.NewPixelRect.Right > mInkObject.AttachedControl.ClientRectangle.Width ||
e.NewPixelRect.Bottom > mInkObject.AttachedControl.ClientRectangle.Height)
{
foreach (Stroke stroke in mInkObject.Selection)
{
// change the stroke color
stroke.DrawingAttributes.Color = Color.Red;
}
}
}
플랫폼
Windows Vista
.NET Framework 및 .NET Compact Framework에서 모든 플랫폼의 전체 버전을 지원하지는 않습니다. 지원되는 버전의 목록을 보려면 .NET Framework 시스템 요구 사항을 참조하십시오.
버전 정보
.NET Framework
3.0에서 지원
참고 항목
참조
InkOverlaySelectionMovingEventArgs 클래스