Page 1 of 1

Thumbnail Viewer: FocusedIndex and SelectedIndex

Posted: Tue Apr 23, 2013 10:48 am
by SebastianB
Imagine of have a ThumbnailViewer and an ImageViewer. imageViewer1 is set a MasterViewer of ThumbnailViewer.

If you click on a ThumbnailImage the ImageViewer displays the correct image. If you change the FocusedIndex both, ThumbnailViewer and ImageViewer change the FocusedIndex, so far so good.

But what does not change is the selected index, which confused the user: With default settings the FocusedImage is highlighted with a dotted rectangle in ThumbnailViewer, the selectedImage is highlighted with the blue gradient box. When clicking on a thumbnail image the selectedImage and the focusedImage are the same, but when changing the focusedIndex programmatically there are two highlighted images in the thumbnail viewer: the focused one and the selected one.
Due to I do not like the dotted line I set the appearance of focusedImage and selectedImage to the same settings (refer screenshot below)

How to change the selectedImage when focusedIndex changed?

The first image was selected by clicking, the second one by changing the focusedIndex using the navigation tools.
Image

Re: Thumbnail Viewer: FocusedIndex and SelectedIndex

Posted: Tue Apr 23, 2013 4:31 pm
by Yuri
Hello,


You have to change the selected thumbnails collection: thumbnailViewer.SelectedIndicies.

After you changed FocusedIndex property programmatically you should clear the collection of SelectedIndicies and add to it FocusedIndex.


Sincerely, Yuri

Re: Thumbnail Viewer: FocusedIndex and SelectedIndex

Posted: Tue Apr 23, 2013 4:38 pm
by SebastianB
That's it! Thanks, Yuri! :D