Views composed of other views

Topics: UI Architecture
Mar 5, 2012 at 2:29 PM
Edited Mar 5, 2012 at 2:32 PM

Hi,

I cant get a view to load as a composite part of my root view. I have a root view which is created view the bootstrapper. Its viewmodel is derived from Conductor<IScreen>.Collection.OneActive.

I have a tabcontrol which hosts the active window and the child windows collection.

I also require a toolbar/panel style window to be housed within the root view, this should not be managed by the conductor into its items property.

Below is what I have,

 VM:

public class WorkSpaceViewModel : Conductor<IScreen>.Collection.OneActive
    {
        public SearchPanelViewModel Panel { get; set; }

        public WorkSpaceViewModel()
        {
            Panel = new SearchPanelViewModel();
        }

	................
    }

WorkSpace View:
<Window x:Class=".....WorkSpaceView">......
<ContentControl x:Name="Panel"/>......
</Window>

Panel View:
<UserControl x:Class=".....SearchPanelView">......
</UserControl>


When the Workspace view is loaded the SearchPanelView is not........ What is the standard way of achieving list?

Best Regards

David 

Mar 6, 2012 at 5:11 AM

so have tried changing the WorkspaceViewModel to Conductor<IScreen>.Collection.AllActive?

Mar 6, 2012 at 9:21 AM
Edited Mar 6, 2012 at 11:34 AM
mvermef wrote:

so have tried changing the WorkspaceViewModel to Conductor<IScreen>.Collection.AllActive?

Hi thanks for the reply.

I've tried this. I lose some of the behaviour such as active item which i used in a TabControl in my main view.That said, I can re-implement this and manually set ActiveItem when opening a screen to achieve what I want.

Many thanks :)