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

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

InkCollectorCursorOutOfRangeEventArgs 成员

Microsoft.Ink 命名空间

InkCollectorCursorOutOfRangeEventHandler