←Select platform

IsSelected Property

Summary

Indicates whether the item is in a selected state.

Syntax
C#
VB
C++
public bool IsSelected { get; set; } 
Public Property IsSelected() As Boolean 
   Get 
   Set 
public:  
   property bool IsSelected 
   { 
      bool get() 
      void set(bool value) 
   } 

Property Value

true if this item is in a selected state, otherwise; false. Default value is false.

Remarks

Selected items (the value of IsSelected is true) may be rendered differently than non-selected items as described in Image Viewer Appearance.

Select and GetSelected can be used to select multiple items at once and get all the selected items in the viewer respectively.

ImageViewerSelectItemsInteractiveMode can be used to select items in the viewer using mouse, touch or keyboard in a manner similar to an "image list" application such as Windows Explorer in Thumbnail View.

For more information, refer Image Viewer Items.

Example
C#
VB
using Leadtools; 
using Leadtools.Controls; 
using Leadtools.Codecs; 
using Leadtools.Drawing; 
 
using Leadtools.ImageProcessing; 
using Leadtools.ImageProcessing.Color; 
 
_imageViewer.BeginUpdate(); 
_imageViewer.Items[0].IsSelected = !_imageViewer.Items[0].IsSelected; 
MessageBox.Show(string.Format("_imageViewer.Items[0].IsSelected = {0}", _imageViewer.Items[0].IsSelected)); 
_imageViewer.EndUpdate(); 
Imports Leadtools 
Imports Leadtools.Controls 
Imports Leadtools.Codecs 
Imports Leadtools.Drawing 
Imports Leadtools.ImageProcessing 
Imports Leadtools.ImageProcessing.Color 
Imports LeadtoolsControlsExamples.LeadtoolsExamples.Common 
 
_imageViewer.BeginUpdate() 
_imageViewer.Items(0).IsSelected = Not _imageViewer.Items(0).IsSelected 
MessageBox.Show(String.Format("_imageViewer.Items[0].IsSelected = {0}", _imageViewer.Items(0).IsSelected)) 
_imageViewer.EndUpdate() 
Requirements
Target Platforms
Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

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