public void Clean() { AdwancedViewModelBase viewModel = DataContext as AdwancedViewModelBase; if (viewModel == null) { return; } viewModel.Clean(); DataContext = null; viewModel = null; }
private void CleanPrivate() { ControlChild.Clear(); AdwancedViewModelBase viewModel = DataContext as AdwancedViewModelBase; if (viewModel == null) { return; } viewModel.Clean(); viewModel = null; DataContext = null; this.Unloaded -= ControlExtended_UnLoaded; }