共用方式為


InkCollectorCursorOutOfRangeEventArgs 類別

提供 InkCollector.CursorOutOfRangeInkOverlay.CursorOutOfRangeInkPicture.CursorOutOfRange 事件的資料。

命名空間:  Microsoft.Ink
組件:  Microsoft.Ink (在 Microsoft.Ink.dll 中)

語法

'宣告
<PermissionSetAttribute(SecurityAction.InheritanceDemand, Name := "FullTrust")> _
Public Class InkCollectorCursorOutOfRangeEventArgs _
    Inherits EventArgs
'用途
Dim instance As InkCollectorCursorOutOfRangeEventArgs
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")]
public class InkCollectorCursorOutOfRangeEventArgs : EventArgs
[PermissionSetAttribute(SecurityAction::InheritanceDemand, Name = L"FullTrust")]
public ref class InkCollectorCursorOutOfRangeEventArgs : public EventArgs
/** @attribute PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust") */
public class InkCollectorCursorOutOfRangeEventArgs extends EventArgs
public class InkCollectorCursorOutOfRangeEventArgs extends EventArgs

範例

在這個範例中,當 CursorOutOfRange 事件引發時,最後一個建立之筆劃的色彩會變更為紅色。

Private Sub mInkObject_CursorOutOfRange(ByVal sender As Object, ByVal e As InkCollectorCursorOutOfRangeEventArgs)
    Using s As Strokes = mInkObject.Ink.Strokes
        If s.Count > 0 Then
            s(s.Count - 1).DrawingAttributes.Color = Color.Tomato
            ' redraw the ink canvas
            panelInkCanvas.Invalidate()
        End If
    End Using
End Sub
private void mInkObject_CursorOutOfRange(object sender, InkCollectorCursorOutOfRangeEventArgs e)
{
    using (Strokes S = mInkObject.Ink.Strokes)
    {
        if (S.Count > 0)
        {
            S[S.Count - 1].DrawingAttributes.Color = Color.Tomato;
            // redraw the ink canvas
            panelInkCanvas.Invalidate();
        }
    }
}

繼承階層架構

System.Object
  System.EventArgs
    Microsoft.Ink.InkCollectorCursorOutOfRangeEventArgs

執行緒安全

這個型別的任何 Public static (在 Visual Basic 中為 Shared) 成員都具備執行緒安全。並非所有的執行個體成員都是安全執行緒。

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求

版本資訊

.NET Framework

支援版本:3.0

請參閱

參考

InkCollectorCursorOutOfRangeEventArgs 成員

Microsoft.Ink 命名空間

InkCollectorCursorOutOfRangeEventHandler