I am working on an application using NCAL with CAG and the XamDockManager.
When trying to persist the layout we have tried using the SaveLayout method and this gives error mesages about our ContentPanes non-unique names.
How do I set a name for the ContentPane where a module is displaying its UI when using NCAL?
The header text for a panel is set with styles in the ContentPaneProxyStyle tag but I can not get to the Name of the ContentPane this way... I think... ?
I managed to remedy the exception by adding a name parameter to the ContentPaneProxy constructor:
public ContentPaneProxy(object content, string name) { _contentPane = new ContentPane(); _contentPane.Content = content; _contentPane.Name = name; // SaveLayout support ContentPaneProxy.SetAssociatedProxy(_contentPane, this); base.DataContext = _contentPane; this.HookEvents(true); }
with the call from XamDockManagerRegion becoming:
ContentPaneProxy contentPaneProxy = new ContentPaneProxy(view, viewName);
which in turn requires a viewName to be specified for each view.
Keep in mind that this doesn't take care of loading (which would require app logic to restore the panes' contents from the names).