Trying to Activate a View using Conductor<T>.Collection.OneActive

Topics: Bugs
Aug 18, 2011 at 9:46 PM


I'm not sure I've found a bug, but I'm having difficulties Deactivating my views.  I traced it all the way back to Conductor<T>.Collection.OneActive, because my views are never active.  They are visible, and quite interactable, but they are not active.

Could it be because of this code in Conductor<T>.Collection.OneActive?

                /// <summary>
                /// Activates the specified item.
                /// </summary>
                /// <param name="item">The item to activate.</param>
                public override void ActivateItem(T item) {
                    if(item != null && item.Equals(ActiveItem)) {
                        if (IsActive) {
                            OnActivationProcessed(item, true);

                    ChangeActiveItem(item, false);
It seems that the only way to activate a view using this conductor is to activate it manually, then call the Conductor's ActivateItem function.
What am I missing?
Aug 19, 2011 at 3:33 AM

You are correct. Screens/Conductors must be rooted in another Conductor in order to be activated (assuming that Conductor is activate) OR they must be shown by the WindowManager OR be the root ViewModel of the application. In those cases, the framework calls Activate. In other scenarios, it is difficult to know *when* or *if* activate should be called.