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

WPF4: Binding on SelectedItem or SelectedIndex doesn't work

1 Answer 215 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Tom
Top achievements
Rank 1
Tom asked on 02 Nov 2010, 05:21 PM
Hi, 

I'm trying to bind the SelectedIndex or SelectedItem properties of the RadTabControl to my viewmodel, but it's not working. It seems as if the binding doens't exist on the property, even though it's clearly there in the XAML.

Trying the exact same scenario with the standard WPF tabcontrol works fine (exaclty the same XAML, only the typenames are different).

In other words, I cannot select a tab or find out what tab is selected without resorting to code behind. Since we're working in a MVVM scenario with no coupling between the view and the model (except for Databinding), this is not an option.

I have a zipfile with a project demostrating this.

Greetings,
Tom


1 Answer, 1 is accepted

Sort by
0
Miro Miroslavov
Telerik team
answered on 08 Nov 2010, 07:55 AM
Hello Tom,

 Can you please find the attached project and if it's working for you. It uses MVVM and RadTabControl, that is bound and the SelecetedItem as well. 
If you still have issues, please send us your example project.
Thank you.

Greetings,
Miro Miroslavov
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
Tom
Top achievements
Rank 1
Answers by
Miro Miroslavov
Telerik team
Share this question
or