public void Clean() { if (s != null) { s.Dispose(); } }
/// <summary> /// Setup the page /// </summary> public SearchView() { // Initialize XAML Components InitializeComponent(); Unloaded += (s, e) => { ViewModel?.Dispose(); }; }
/// <summary> /// Setup the page /// </summary> public SearchView() { // Initialize XAML Components InitializeComponent(); // Set the data context DataContext = ViewModel; Unloaded += (s, e) => { ViewModel.Dispose(); }; }