private void OnClose(object sender, RoutedEventArgs e) { //************************************************************************************************************************************ // Close setting view/screen. //************************************************************************************************************************************ Console.WriteLine("Close Clicked"); _currentContent.SaveData(); this.Hide(); }
private void OnBack(object sender, RoutedEventArgs e) { Console.WriteLine("Back Clicked"); if (_currentContent == _mainPanel) { // ignore return; } if (_previousContent.Count > 0) { // beacuse this comes from the main control not from within the content, // make sure that the current data is saved before changing content _currentContent.SaveData(); // set the new content in this panel _currentContent = _previousContent[_previousContent.Count - 1]; // pop the panel that is now the current panel off the previous stack _previousContent.Remove(_currentContent); UpdateContentInUI(); } }