[Version 2.0] Saving Layout

May 18, 2012 at 2:58 PM

Hi, I am trying to save and restore layout in MVVM type application. I have implemented a "ContentId" property with propertychangednotification on my viewmodel object but the ContentId doesn't get saved to the layout .xml file. I wonder, does my viewmodel have to implement other properties as well as ContentId?

 

May 22, 2012 at 8:10 AM

I think, you are missing something like this:

<avalonDock:DockingManager.LayoutItemContainerStyle>
  <Style TargetType="{x:Type avalonDock:LayoutItem}">
    <Setter Property="ContentId" Value="{Binding Model.MyContentID}"
  </Style>
</avalonDock:DockingManager.LayoutItemContainerStyle>

May 23, 2012 at 8:01 PM

With a little bit of work to cater for my implementation that's it, thanks for taking the time to help, liero.