void CurrentFrameChanged(object sender, EventArgs e) { if (window != null) { window.Destroy(); window = null; } }
void DestroyWindow() { Runtime.AssertMainThread(); if (window != null) { window.Destroy(); window.LeaveNotifyEvent -= LeaveNotifyEvent; window = null; } if (lastView != null) { lastView.LayoutChanged -= LayoutChanged; #if CLOSE_ON_FOCUS_LOST lastView.LostAggregateFocus -= View_LostAggregateFocus; #endif lastView = null; } if (lastDocumentView != null) { lastDocumentView.ContentHidden -= DocumentView_ContentHidden; lastDocumentView = null; } }