This is a migrated thread and some comments may be shown as answers.

TabItem

1 Answer 87 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Leo
Top achievements
Rank 2
Leo asked on 01 Nov 2010, 09:34 PM
Is there a way I could determine what is the current tab item that the user is selected AND with that tab item I could dynamically load usercontrol/xaml page into the tab item.

Here's the scenario: I have two user controls one is Main page and the next is let's say Sales Page.

By default my first tab already loads the Main page, now when I want to add a new tab, I will have to load the Main page too and by that I would like to navigate to the Sales page on the second tab? I can only do navigate on the first tab but I don't know how to dynamically navigate on the succeeding new tabs? Unless I know how to determine the tab that is selected and manipulate the Content property of tabItem into the user control.

Is there any possible solutions or how is this possible? Help please. Thanks 

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 04 Nov 2010, 04:28 PM
Hello Leo,

The currently selected RadTabItem could be accessed by the RadTabControl.SelectedItem property.
The content of the selected item could be get/set  like so:

(radTabControl.SelectedItem as  RadTabItem).Content
or
radTabControl.SelectedContent.

You can navigate the RadTabItems by using the SelectedIndex property of the RadTabControl.
Please let us know if this info helps you. If it doesn`t feel free to ask and we would be glad to assist you.

Sincerely yours,

Petar Mladenov
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items
Tags
TabControl
Asked by
Leo
Top achievements
Rank 2
Answers by
Petar Mladenov
Telerik team
Share this question
or