You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use AvalonDock with Stylet. Stylet is a ViewModel first MVVM framework, but I just can't get them to play nicely together, and I'm not sure if the problem is with my code, Stylet or AvalonDock.
ViewModels for Layouts and Anchorable Layouts are held in ObervableCollections. Stylet should then automatically find the relevant View based on its name.
I'm finding that new Layouts works fine with Stylet, but the new Anchorable Layout throws the error of 'Unable to transform ViewModel name AvalonDock.Layout.LayoutAnchorable into a suitable View name'.
I've made a barebones app that replicates the problem here if there's anyone kind enough to have a play to see if they can figure out where the problem is.
What's quite odd is if I remove the AvalonDock 2013 Light Theme form the XAML, or change it to another Theme, then I get the above error with both Layouts and Anchorable Layouts.
The issue doesn't appear to be with the ViewModels themselves as I can throw a Anchorable Layout in the Layout ObservableCollection and it works fine.
Any help would be much appreciated.
The text was updated successfully, but these errors were encountered:
This is because when LayoutItemTemplate is used with LayoutAnchorable, the DataContext available to bindings in the LayoutItemTemplate is a ContentControl, whose Content property is the LayoutAnchorable. That's different to when the LayoutItemTemplate is applied to a LayoutDocument: in that case, the DataContext is the LayoutDocument itself.
I'm trying to use AvalonDock with Stylet. Stylet is a ViewModel first MVVM framework, but I just can't get them to play nicely together, and I'm not sure if the problem is with my code, Stylet or AvalonDock.
ViewModels for Layouts and Anchorable Layouts are held in ObervableCollections. Stylet should then automatically find the relevant View based on its name.
I'm finding that new Layouts works fine with Stylet, but the new Anchorable Layout throws the error of 'Unable to transform ViewModel name AvalonDock.Layout.LayoutAnchorable into a suitable View name'.
I've made a barebones app that replicates the problem here if there's anyone kind enough to have a play to see if they can figure out where the problem is.
https://github.com/montyjohn/StyletAvalonDockTest.git
What's quite odd is if I remove the AvalonDock 2013 Light Theme form the XAML, or change it to another Theme, then I get the above error with both Layouts and Anchorable Layouts.
The issue doesn't appear to be with the ViewModels themselves as I can throw a Anchorable Layout in the Layout ObservableCollection and it works fine.
Any help would be much appreciated.
The text was updated successfully, but these errors were encountered: