RadTileViewItem IsSelected causes TileView to focus

2 posts, 0 answers
  1. PaulR
    PaulR avatar
    19 posts
    Member since:
    Jun 2016

    Posted 05 Jul Link to this post

    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.

     

  2. PaulR
    PaulR avatar
    19 posts
    Member since:
    Jun 2016

    Posted 05 Jul in reply to PaulR Link to this post

    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 :)
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top