How to retrieve RadComboBoxItems when using VirutalizingStackPanel?

2 posts, 0 answers
  1. Joel
    Joel avatar
    11 posts
    Member since:
    Dec 2010

    Posted 01 Mar 2011 Link to this post

    Hi,

    I'm using WebAii to write automated tests for a Silverlight application.  Recently, some the RadComboBoxes in the app have been changed to use the VirtualizingStackPanel.  The following test code now fails with the following error:  

    • Code Sample - int saveCount = radComboBox.Items.Count;
    • Error Generated - System.TimeoutException:  Wait for condition has timed out.

    This will happen on any statement that attempts to reference the Telerik.WebAii.Controls.Xaml.RadComboBox Items property,

    How do I get this to work (or what's the work around) when the VirtualizingStackPanel is used with the RadComboBox control?

    Thanks.

    Joel
  2. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 07 Mar 2011 Link to this post

    Hello Joel,

    There was a missed case in the wrappers for RadComboBox. It was searching for StackPanel but in this case the container is VirtualizingStackpanel. We fixed it and it will not crash in next version of the framework. However if you want to check the count of all items it will not work. WebAii framework depends on the items in the visual tree and it will take into account only the visible items. So if you have 1000 items for example the count will return just 11(the visible ones). This is how virtualization works and if these items are not in the visual tree we can't do nothing about it.

    I have updated your Telerik points for your report. Don't hesitate to contact us if you have further questions.

    All the best,
    Boyan
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top