Share via


InkCollectorCursorOutOfRangeEventArgs Class

Provides data for the InkCollector.CursorOutOfRange, InkOverlay.CursorOutOfRange, and InkPicture.CursorOutOfRange events.

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink (in Microsoft.Ink.dll)

Syntax

'Declaration
<PermissionSetAttribute(SecurityAction.InheritanceDemand, Name := "FullTrust")> _
Public Class InkCollectorCursorOutOfRangeEventArgs _
    Inherits EventArgs
'Usage
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
public class InkCollectorCursorOutOfRangeEventArgs extends EventArgs

Examples

In this example, when the CursorOutOfRange event fires, the color of the last stroke to be created is changed to red.

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();
        }
    }
}

Inheritance Hierarchy

System.Object
  System.EventArgs
    Microsoft.Ink.InkCollectorCursorOutOfRangeEventArgs

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkCollectorCursorOutOfRangeEventArgs Members

Microsoft.Ink Namespace

InkCollectorCursorOutOfRangeEventHandler