I expected that child View Models inheriting from Screen would participate in the Parent Screen's life-cycle. However, it appears this is not the case. For example:
public class ParentViewModel : Screen
{
public ChildViewModel Child { get; set; }
public ParentViewModel(ChildViewModel childViewModel)
{
this.Child = childViewModel;
}
public override void OnInitialize() { // called - as expected }
public override void OnActivate() { // called - as expected }
public override void OnDeactivate() { // called - as expected }
}
public class ChildViewModel : Screen
{
public override void OnInitialize() { // not called - why? }
public override void OnActivate() { // not called - why? }
public override void OnDeactivate() { // not called - why? }
}
Is it possible to have a child Screen participate in the parent Screen's life-cycle?
Conductor<T>.Collection.AllActive
would have to be used. – Rees