public void ShowNestedSample <TPage>(bool clearStack = false) where TPage : Page { if (NestedSampleFrame.Navigate(typeof(TPage)) && clearStack) { NestedSampleFrame.BackStack.Clear(); } }
public void ShowNestedSample <TPage>(bool?clearStack = null) where TPage : Page { var wasFrameEmpty = NestedSampleFrame.Content == null; if (NestedSampleFrame.Navigate(typeof(TPage)) && (clearStack ?? wasFrameEmpty)) { NestedSampleFrame.BackStack.Clear(); } }