protected internal void View_NavigatedCore(object sender, Windows.UI.Xaml.Navigation.NavigationEventArgs e) { if (e != null) { if (CurrentChild != null) { CurrentChild.InvokeOnNavigatedFrom(e); CurrentChild.Cleanup(); CurrentChild = null; } MemoryCheck(); Type key = e.Content.GetType(); var child = Children[key]; var element = e.Content as FrameworkElement; child.Parent = this; child.ViewBase = element; CurrentChild = child; child.Initialize(); child.InvokeOnNavigatedTo(e); } }
protected internal void View_NavigatedCore(object sender, NavigationEventArgs e) { try { if (e != null) { if (CurrentChild != null) { CurrentChild.InvokeOnNavigatedFrom(e); CurrentChild.Cleanup(); CurrentChild = null; } MemoryCheck(); Type key = e.Content.GetType(); var child = Children[key]; var element = e.Content as FrameworkElement; child.Parent = this; child.ViewBase = element; CurrentChild = child; child.Initialize(); child.InvokeOnNavigatedTo(e); } } catch (Exception ex) { throw new IOException(null, ex); } }
/// <summary> /// クリーンアップ /// </summary> public override void Cleanup() { if (CurrentChild != null) { CurrentChild.Cleanup(); CurrentChild = null; } base.Cleanup(); }