Change displayed tab from user control

3 posts, 0 answers
  1. Chris
    Chris avatar
    8 posts
    Member since:
    Jan 2011

    Posted 26 Jan 2011 Link to this post

    I'm new to the telerik control and using them with Silverlight so I apologize ahead of time if this is a simple question.

    Here is my situation:

    I have a page, let's call it a.xaml, that has the RadTabControl (name=MainTabControl).  This tab control has 5 tabs.  On the 3rd tab, I have an XAML user control, let's call it b.xaml, that has another XAML user control, let's call it c.xaml, that contains a Silverlight button.  When I click the button on c.xaml, I need the tab control on a.xaml to display the 1st tab. 

    I have tried creating a property in the code behind for a.xaml that sets the tab control's SelectedIndex to 1 and then attempted to set that property from a click event on c.xaml.  This however, is not working.

    What approach do I need to take to accomplish this navigation action or is it evey possible?

  2. Petar Mladenov
    Petar Mladenov avatar
    2882 posts

    Posted 01 Feb 2011 Link to this post

    Hi Chris,

    Please check out the attached project and let us know if it fits in your scenario. Basically, I am iterating over the visual tree until I get the RadTabControl and set its SelectedIndex property. Let us know if you need more info on this topic.

    Petar Mladenov
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. DevCraft R3 2016 release webinar banner
  4. Chris
    Chris avatar
    8 posts
    Member since:
    Jan 2011

    Posted 03 Feb 2011 Link to this post


    Yes, that did exactly what I needed.  I appreciate your help and working out an entire solution to show me the example.

Back to Top