I've attached a sample that demonstrates this issue: I have a simple layout with 3 LayoutControlItems databound to properties on a ViewModel. When I run the program everything works as normal. However, when I click on the 'Other' Tab and click back to 'Sample Data' tab -- the data binding no longer works as expected. It appears from the Output window the original bindings are now pointing to the LayoutPanel as a data context rather than the ViewModel specified in XAML.
LayoutControlItem loses its DataContext after changing a tab within a parent TabbedGroup
Answers approved by DevExpress Support
We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.
Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.
- v15.2.4Download Official Update
- v15.1.10Download Official Update
Hi,
We have successfully reproduced the behavior you described and passed this ticket to our developers for further research. Please bear with us. We will notify you as soon as we make any progress.
As a temporary solution, change your bindings as follows:
<TextBlock Text="{Binding DataContext.SampleValue1,RelativeSource={RelativeSource AncestorType=dxdo:LayoutPanel}}"/>
Thanks,
Andrey