←Select platform

GetSelected Method

Summary

Returns the current selected items in the viewer

Syntax
C#
C++/CLI
public ImageViewerItem[] GetSelected() 
public:  
   array<ImageViewerItem^>^ GetSelected() 

Return Value

An array of the items that are currently selected in the viewer.

Remarks

This method will return an array that contains all the items that have the value of ImageViewerItem.IsSelected set to true.

Example
C#
using Leadtools; 
using Leadtools.Controls; 
using Leadtools.Codecs; 
using Leadtools.Drawing; 
 
using Leadtools.ImageProcessing; 
using Leadtools.ImageProcessing.Color; 
 
_imageViewer.InteractiveModes.BeginUpdate(); 
_imageViewer.InteractiveModes.Add(new ImageViewerSelectItemsInteractiveMode { IsEnabled = false }); 
_imageViewer.InteractiveModes.EndUpdate(); 
 
foreach (var interactiveMode in _imageViewer.InteractiveModes) 
{ 
   ImageViewerSelectItemsInteractiveMode selectionMode = interactiveMode as ImageViewerSelectItemsInteractiveMode; 
   if (selectionMode != null) 
   { 
      selectionMode.SelectionMode = ImageViewerSelectionMode.Multi; 
   } 
} 
Requirements

Target Platforms

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

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