LoopingList - IsExpanded does not seem to work

3 posts, 1 answers
  1. AS
    AS avatar
    14 posts
    Member since:
    Jan 2015

    Posted 12 May 2015 Link to this post

    Hi

    For RadLoopingList, IsExpanded does not seem to work ...

    http://docs.telerik.com/windows-universal/controls/radloopinglist/loopinglist-features

    Is this a glitch? The behavior I am seeing is that the non-selected items disappear when the control looses focus, with IsExpanded set either true or false.

    Another, perhaps related thing I am seeing ...

    If you have two RadLoopingLists on a page, RLL1 and RLL2, the initial state with IsExpanded set to true, is that both the controls will show the selected item, and the non-selected items as well. In this scenario, the following steps are interesting ...

    1. Start the application 

    2. RLL1 and RLL2 show the default initial selected item, and the non-selected items as well. Expected.

    3. Scroll RLL1, it will loop and select an item after the animation. Expected.

    4. RLL1 shows the new selected item and RLL2 shows the default initial selected item, and both RLL1 and RLL2 show the non-selected items as well. Expected.

    5. Restart the application

    6. RLL1 and RLL2 show the default initial selected item, and the non-selected items as well. Expected.

    7. Scroll RLL2, it will loop and select an item after the animation. Expected.

    8. RLL1 shows the default initial selected item and RLL2 shows the new selected item , and RLL2 shows the non-selected items as well. Expected. RLL1 only shows the default initial selected item, the non-selected items are not visible now. Not Expected. Not consistent with (4).

    Thanks

  2. Answer
    Vladislav
    Admin
    Vladislav avatar
    275 posts

    Posted 15 May 2015 Link to this post

    Hi AS,

    The described behavior is actually expected because the RadLoopingList uses (and changes internally) the "IsExpanded" property on some actions. In your case - on lost focus it set it to "false" no matter that you set it initially to "true". If your goal is to keep the RadLoopingList expanded always, there is a simple workaround - you need to set explicitly the "IsExpanded" property to "true" in the "LostFocus" event.

    Something like this:
    private void loopingList1_LostFocus(object sender, RoutedEventArgs e)
     {
         this.loopingList1.IsExpanded = true;
     }

    Can you please check this suggestion and let us know if it is applicable in your scenario/project?

    Regards,
    Vladislav
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. AS
    AS avatar
    14 posts
    Member since:
    Jan 2015

    Posted 15 May 2015 in reply to Vladislav Link to this post

    Hi

    I did not think that the IsExpanded state would be changed on losing focus, so I didn't even think about this little workaround!

    Thanks a ton! This simple workaround works.

Back to Top