This is a migrated thread and some comments may be shown as answers.

RadTileViewItem IsSelected causes TileView to focus

1 Answer 56 Views
TileView
This is a migrated thread and some comments may be shown as answers.
PaulR
Top achievements
Rank 1
PaulR asked on 06 Jul 2016, 01:24 AM

When SelectionMode=Extended.

I'm using a RadTileView with multiselection turned on, and when I programmatically change the SelectedItems in the view, the view becomes focused and of course steals focus away from the other control that the user is on. That is... well, I'm trying to understand why you would even do that, and why only for the Extended mode.

(I know now that repro-ing issues seems to be difficult at times, so here is the relevant code I found in ILSpy and with a simple GotFocus hook on the RadTileView:

 

// Telerik.Windows.Controls.RadTileViewItem
protected virtual void OnIsSelectedChanged(bool oldValue, bool newValue)

{

   ...

   if (newValue && this.ParentTileView != null && this.ParentTileView.SelectionMode == SelectionMode.Extended)
   {

            // REALLY BAD IDEA

-->       base.Focus();
-->       this.ParentTileView.ContainerToFocus = this;
   }

   ...

}

Anyway, it "looks" like I can derive from RadTileView and then derive from the RadTileViewItem class and then override that method and call base with newValue = false, but I have yet to try. Still, not ideal.

 

1 Answer, 1 is accepted

Sort by
0
PaulR
Top achievements
Rank 1
answered on 06 Jul 2016, 03:48 AM
Hi, IDK, you can ignore this bug report, if you want. I've now decided to no longer use the RadTileView. Too "over-featured" for my needs resulting in performance issues. Probably only need about 10% of it. Bad hiccupping problem when dragging the thumb in the vertical scroll bar also. Regular listbox with virtualizing tile panel works way better, and doesn't steal focus :)
Tags
TileView
Asked by
PaulR
Top achievements
Rank 1
Answers by
PaulR
Top achievements
Rank 1
Share this question
or