private void UnsubscribeEvents() { if (rootFrame != null) { rootFrame.Navigating -= rootFrame_Navigating; rootFrame.Navigated -= rootFrame_Navigated; rootFrame.Unloaded -= rootFrame_Unloaded; } }