Mouse cursor to use for the working state of this ImageViewerInteractiveMode.
public virtual Cursor WorkingCursor { get; set; }
Public Overridable Property WorkingCursor() As System.Windows.Forms.Cursor
Get
Set
public:
virtual property System::Windows::Forms::Cursor^ WorkingCursor
{
System::Windows::Forms::Cursor^ get()
void set(System::Windows::Forms::Cursor^ value)
}
The mouse cursor to use for the working state of this ImageViewerInteractiveMode. The default value is null.
IdleCursor and WorkingCursor are only used when this ImageViewerInteractiveMode is attached to the left mouse button and is enabled.
The cursors are set into the ImageViewer control when this interactive mode is assigned to the left mouse button. Also, the cursors will be set in any elements added by the user to the InteractiveService.UserControls collection.
IdleCursor will be set when the interactive mode is started (after Start is called) and remove when the mode is stopped (when Stop is called).
WorkingCursor will be set when the interactive mode is working (when OnWorkStarted is called) and removed (or set back to idle) when the interactive mode has stopped working (when OnWorkCompleted) is called).
These cursors can be used to provide visual clue into the current interactive mode operations. For instance, when using the ImageViewerPanZoomInteractiveMode interactive mode, you can set the IdleCursor to "crosshair" and the WorkingCursor to "move".
A value of null means do not change the cursor. To hide the cursor when the mode is working, use HideCursorWhileWorking.
Run the example. The cursor changes to a "crosshair" when it is on the surface of the viewer. When you click and drag, the cursor changes to "move".
Start with the ImageViewer example, remove all the code inside the example function (search for the "// TODO: add example code here" comment) and insert the following code:
using Leadtools;
using Leadtools.Controls;
using Leadtools.Codecs;
using Leadtools.Drawing;
using LeadtoolsExamples.Common;
using Leadtools.ImageProcessing;
using Leadtools.ImageProcessing.Color;
_imageViewer.InteractiveModes.BeginUpdate();
ImageViewerPanZoomInteractiveMode panZoom = new ImageViewerPanZoomInteractiveMode { IsEnabled = false };
_imageViewer.InteractiveModes.Add(panZoom);
panZoom.WorkingCursor = Cursors.Hand;
_imageViewer.InteractiveModes.EndUpdate();
Imports Leadtools
Imports Leadtools.Controls
Imports Leadtools.Codecs
Imports Leadtools.Drawing
Imports Leadtools.ImageProcessing
Imports Leadtools.ImageProcessing.Color
_imageViewer.InteractiveModes.BeginUpdate()
Dim panZoom As New ImageViewerPanZoomInteractiveMode
panZoom.IsEnabled = False
_imageViewer.InteractiveModes.Add(panZoom)
panZoom.WorkingCursor = Cursors.Hand
_imageViewer.InteractiveModes.EndUpdate()
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET