I am setting the thumbnail SelectedIndices to the FocusedIndex. I am doing this on the ThumbnailViewer.FocusedIndexChanged event.
I am doing this so the selected thumbnail will be in sync with the focused image in the viewer as it is scrolled.
This works well except when the document is first loaded.
When the document is loaded the FocusedIndexChanged event is called and the focused index is set to 0. The SelectedIndices is set to the same
index as the focused index.
However if i try to select multiple thumbnails, by pressing shift and clicking on a thumbnail, the index collection is just the selected thumbnail index of the thumbnail i shift-clicked on instead of the selected range of indexes.
If I click on a thumbnail to select it and the shift click on a different thumbnail, I get the expected selected range of indexes.
I would expect that when the first thumbnail is selected when the document is loaded, that I would be able to select multiple thumbnails by using shift-click.
Is there something else I need to do when the SelectedIndices is set when the document is loaded and the firset FocusIndexChanged event is fired?
Here is a sample of the FocusedIndexChanged event.
Code: Select all
private void ThumbnailViewer_FocusedIndexChanged(object sender, FocusedIndexChangedEventArgs e)
{
ToolbarControl.SetPageLabel(e.FocusedIndex + 1);
_thumbnailViewer.FocusedIndex = e.FocusedIndex;
_thumbnailViewer.SelectedIndices.Clear();
_thumbnailViewer.SelectedIndices.Add(e.FocusedIndex);
}
Harlan