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

Problems with ContentTemplate distroyed

1 Answer 34 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Nick Wood
Top achievements
Rank 1
Nick Wood asked on 23 Apr 2011, 10:19 PM
Hi All

I have discovered a major issue with the latest Telerik binaries added to our project (Q1 2011), we recently updated from Q3 2010.
 
I have a RadTab control in my site virtualizer feature that binds to an ObservableCollection itemssource. There are controls on both the parent UI and the DataTemplates for the Tab Items that bind to properties on the Collection ViewModels.
 
This was all working perfectly on the previous Telerik bin versions, but after the update, it was only the first selected tab that would bind correctly. Any tab selected after that would raise the property change from both the parent and the DataTemplate, but it would not communicate between the 2. It seems to be as if there are cloned DataContext/ViewModels created so separate instances of the same ViewModel.
 
It was confirmed as being an issue with the Telerik bin version when I rolled back to the previous builds and the features worked as they previous had, as they should have.
 
There are some major changes to the way in which navigation controls now create instances, they now release non selected ControlTemplates, see here: http://www.telerik.com/help/silverlight/radtabcontrol-how-to-keep-content.html
 
I have tried setting the: IsContentPreserved Property to true as suggested, but it does not bind to the Collection for the ContentTemplate as a DataContext at all..

This seems to be a major issue and it seems to relate to a navigation base class as I tried this also by binding to the same ItemsSource from a RadPaneGroup:

<telerik:RadPaneGroup ItemsSource="{Binding SiteLayoutVMs}" ItemTemplate="{StaticResource SiteVirtualDisplayLayoutsHeader}"
                                          ContentTemplate="{StaticResource SiteVirtualDisplayLayoutsTemplate}"
                                          SelectedItem="{Binding SelectedDisplayLayout, Mode=TwoWay}">

But the very same issue occured.

Please respond ASAP

Nick



1 Answer, 1 is accepted

Sort by
0
Nick Wood
Top achievements
Rank 1
answered on 24 Apr 2011, 10:47 PM
Nevermind

Fixed in the latest build 2011_1_0419
Tags
TabControl
Asked by
Nick Wood
Top achievements
Rank 1
Answers by
Nick Wood
Top achievements
Rank 1
Share this question
or