←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; 
 
public void ImageViewerSelectItemsInteractiveMode_Example() 
{ 
   _imageViewer.InteractiveModes.BeginUpdate(); 
   _imageViewer.InteractiveModes.Add(new ImageViewerSelectItemsInteractiveMode { IsEnabled = false }); 
   _imageViewer.InteractiveModes.EndUpdate(); 
   _imageViewer.Items.GetSelected(); 
 
   foreach (var interactiveMode in _imageViewer.InteractiveModes) 
   { 
      ImageViewerSelectItemsInteractiveMode selectionMode = interactiveMode as ImageViewerSelectItemsInteractiveMode; 
      if (selectionMode != null) 
      { 
         selectionMode.SelectionMode = ImageViewerSelectionMode.Multi; 
      } 
   } 
} 
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.