Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

New Post: AvalonDock DocumentsSource and DataTemplateSelector Issue

$
0
0
I posted this question on stackoverflow.com
Basically, I have DockingManager.DocumentsSource bound to an ObservableCollection<object> and DockingManager.LayoutItemTemplateSelector bound to a custom DataTemplateSelector class. When I add a ViewModel to the ObservableCollection, DataTemplateSelector.SelectTemplate() is called but is passed a ContentPresenter containing the ViewModel instead of just the ViewModel itself. This screws up the data binding on the returned DataTemplate because its DataContext ends up getting set to the ContentPresenter instead of the ViewModel.

Today I tried something new. I copied my project to the source code of AvalonDock from their old codeplex site. I referenced the source code project instead of the dll from nuget. Voila! My DataTemplateSelector starts receiving the ViewModel instead of a ContentPresenter

Still, I would like to use nuget in order to receive future updates. Does anyone know what's going on? Is there a new way of binding DocumentsSource Now?

Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>