I am not entirely sure how you implement the described scenario, but the information you gave us, indicates that the RadTabItems
and the RadTabControl
all use different instances of the BaseViewmodel
. This is why when you try to control the BaseViewmodel.CurrentStep
from the RadTabItems ViewModels
, you're actually changing another instance of the BaseViewmodel
, not the instance that the RadTabCantrol
is bound to.
This is why I'd recommend using entirely an MVVM approach. You can bind the RadTabControl ItemsSource
collection to a collection of business items. Use the RadTabControl.ContentTemplate
property to define the content of each RadTabItem
and create a command to change the SelectedIndex
. I attached a sample project demonstrating this approach.
Also, if you need to display different content for the items, then you can create a DataTemplateSelector
and use it as a ContentTemplateSelector
Please give this approach a try and let us know how it goes.
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>