null item for Conductor.Collection.OneActive

Topics: Conventions, UI Architecture
Sep 13, 2013 at 8:04 AM
I have a program that I'm using using CM on, and one of my Views can have a few separate sub-views visible, essentially displaying different forms of the same data. Only one of them can be visible at a time, so I made the container view a Conductor.Collection.OneActive. I also have toggle buttons tied to each sub-view, toggling between the sub-views works fine but I would also like a "no sub-view" state.

I've tried the obvious ActivateItem(null), DeactivateItem(current, false), and ActiveItem = null, but I can only get one or the other to show and not a "null" or empty state. Is this possible with the Conductor.Collection.OneActive? I origonally had Conductor by itself, but I don't want the ViewModels to close when they aren't active.

Any suggestions would be much appreciated.
Sep 14, 2013 at 7:23 PM
Ok, I found a way to make it work.

I overload DetermineNextItemToActivate and make it always return null. Then, setting ActiveItem = null; has the desired effect.