I'm using MVVM pattern and C#, I public a ReadOnlyCollection property from View-Model, In View, there is a TabControl that ItemsSource property is Binding to this ReadOnlyCollection Property. How can I know which item is being selected from View-Model? If ReadOnlyCollection cannot do this, what type should i use? Thank you.
Asked
Active
Viewed 173 times
0
-
do you search for something like this: http://stackoverflow.com/questions/5650812/how-do-i-bind-a-tabcontrol-to-a-collection-of-viewmodels ?? – blindmeis Dec 04 '13 at 08:32
-
no, i'm sorry. Next time i will. – user2577111 Dec 06 '13 at 01:45
1 Answers
0
You can bind to the SelectedItem
property of the TabControl
to an additional property in your ViewModel.
Check MSDN for all the properties of TabControl
.