VisualState not updating in CoverFlow Employee Example

4 posts, 1 answers
  1. Software Support
    Software Support avatar
    7 posts
    Member since:
    May 2008

    Posted 08 Dec 2010 Link to this post

    In using the CoverFlow to show our employees, I have set the SelectedIndex to the middle picture with the following code:


    private void employeeRCF_Loaded(object sender, RoutedEventArgs e)
    {
        this.employeeRCF.SelectedIndex = Convert.ToInt32(this.employeeRCF.Items.Count / 2);
    }


    When I run the code, the correct RadCoverFlowItem is showing but the VisualState does not update.  Instead of the RadCoverFlowItem showing as smaller picture with the name located in the center at the top, I see a large picture with the name on the right (same look and feel of the RadCoverFlowItems on the right of the selected RadCoverFlowItem from Telerik's example).  If I click on another employee and then click on the original employee, everything looks fine.

    I have attempted to manually change the VisualState of the RadCoverFlowItem with the following code:


    private
    void employeeRCF_Loaded(object sender, RoutedEventArgs e
    )
    {
        this.employeeRCF.SelectedIndex = Convert.ToInt32(this.employeeRCF.Items.Count / 2);

        VisualStateManager
    .GoToState(this.employeeRCF, "Centered", true);
    }


    When I run the above code, nothing happens to the RadCoverFlowItem.  What do I need to do to get the SelectedIndex RadCoverFlowItem to show properly when accessing the site?

     

  2. Software Support
    Software Support avatar
    7 posts
    Member since:
    May 2008

    Posted 13 Dec 2010 Link to this post

    Any help would greatly be appreciated.

    Thank you
  3. DevCraft banner
  4. Answer
    George
    Admin
    George avatar
    1332 posts

    Posted 14 Dec 2010 Link to this post

    Hello Bradford,

    I tried to reproduce the problem, but to no avail. Please, refer to the attached project. Let me know if I missed something. 

    Best wishes,
    George
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  5. Software Support
    Software Support avatar
    7 posts
    Member since:
    May 2008

    Posted 19 Dec 2010 Link to this post

    George,

    Thank you for your assistance in this matter. 
Back to Top