←Select platform

ImageViewerActiveItemInteractiveMode Class

Summary

Allows you to change the current active item in the viewer using the keyboard or mouse/touch.

Syntax
C#
C++/CLI
public class ImageViewerActiveItemInteractiveMode : ImageViewerInteractiveMode 
public ref class ImageViewerActiveItemInteractiveMode : ImageViewerInteractiveMode 
Remarks

The ImageViewerActiveItemInteractiveMode derives from the ImageViewerInteractiveMode and subscribes to the following events of the InteractiveService:

ImageViewerActiveItemInteractiveMode changes the current ActiveItem as follows:

  • If the user clicks on an item, it will become the new ActiveItem.

  • If IsKeyboardEnabled is set to true, moving using the arrow, page up/down, home and end key will also set the ActiveItem. This works as a "grid" using the current ViewLayout. For example, if you press the down arrow, the item below the current active item (if any) will become the new active item. If you press the left arrow, the item to the left of the current item will become the new active item, and so on.

  • If the value of IsHoverEnabled is set to true, then moving the mouse over an item will change its IsHovered to true, whereas moving the mouse away from the item sets it back to false. If you changed the image viewer appearance to have different styles for hovered items, then the UI will provide an indication of this operation. For more information, refer to Image Viewer Appearance.

When a new active item is set, InteractiveEventArgs.IsHandled is set to true.

For more information, refer to Image Viewer Interactive Modes.

Example
C#
using Leadtools; 
using Leadtools.Controls; 
using Leadtools.Codecs; 
using Leadtools.Drawing; 
 
using Leadtools.ImageProcessing; 
using Leadtools.ImageProcessing.Color; 
 
public void ImageViewerActiveItemInteractiveModeExample() 
{ 
   _imageViewer.InteractiveModes.BeginUpdate(); 
   _imageViewer.InteractiveModes.Add(new ImageViewerActiveItemInteractiveMode { IsHoverEnabled = true, IsKeyboardEnabled = true }); 
   _imageViewer.InteractiveModes.EndUpdate(); 
} 
Requirements

Target Platforms

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Controls Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.