DataBinding

Mar 19 2013 7:51 AM

Hi,

I have a scenario where my View is not updating upon changes in the ViewModel. All Notifications are implemented.

I have a TabControl and a Grid displaying some values.
On Selecting a row in Grid, Tab content should be updated with the selected row values. But the Tab content wont update.
It updates or refreshes only on Tab switch. This has been implemented in MVVM way.

sample xaml code:


<TabControl ContentTemplateSelector="{StaticResource instanceTemplate}" TabStripPlacement="Bottom"
ItemsSource="{Binding CurrentViewItem.ViewModel.MyCollection,
FallbackValue={StaticResource efaultMultiInstanceValue}}"
SelectedItem="{Binding CurrentViewItem.ViewModel.SelectedItem}"
IsSynchronizedWithCurrentItem="True" >


<!--Tab content/panel-->
<ScrollViewer Grid.Row="0" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Auto">
<ContentPresenter x:Name
="PART_SelectedContentHost"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels
}"
Margin="{TemplateBinding adding
}"
ContentSource="SelectedContent"/>



MyCollection is the property getting updated and firing the notification. I am trying to change the SelectedItem value in my TabItem's content via  SelectedItem Object from viewModel.

So far no success,

Any help would be really helpfull.

thanks,
kasavar