c# - How do I bind an ObservableCollection to an AvalonDock DocumentPaneGroup? -
i need load collection of items documents in avalondock 2.0. these objects inherit abstract class, want render frame inside document depending on subclass are.
this xaml:
<ad:dockingmanager background="gray" documentssource="{binding path=openprojects}" activecontent="{binding path=currentproject, mode=twoway}"> <ad:dockingmanager.documentheadertemplate> <datatemplate> <textblock text="{binding path=openprojects/name}" /> </datatemplate> </ad:dockingmanager.documentheadertemplate> <ad:dockingmanager.layoutitemtemplate> <datatemplate> <grid> <grid.resources> <datatemplate datatype="{x:type vm:subclassaviewmodel}"> <frame source="pages/subclassaproject.xaml" /> </datatemplate> <datatemplate datatype="{x:type vm:subclassbviewmodel}"> <frame source="pages/subclassbproject.xaml" /> </datatemplate> <datatemplate datatype="{x:type vm:subclasscviewmodel}"> <frame source="pages/subclasscproject.xaml" /> </datatemplate> </grid.resources> </grid> </datatemplate> </ad:dockingmanager.layoutitemtemplate> <ad:layoutroot> <ad:layoutpanel> <ad:layoutdocumentpanegroup> <ad:layoutdocumentpane> </ad:layoutdocumentpane> </ad:layoutdocumentpanegroup> </ad:layoutpanel> </ad:layoutroot> </ad:dockingmanager>
so far i've achieved show many documents items in openprojects
collection, can't seem show inside each document.
plus, don't know if i'm using activecontent
properly: want assign currentproject
viewmodel assigned on current active document.
thank time.
Comments
Post a Comment