internal void SetSyncParameters(SyncControlGridItemSet sync_control_grid_item_set) { this.sync_control_grid_item_set = sync_control_grid_item_set; // Clear up GridLibraryGrid.ItemsSource = null; // Freshen up if (null != sync_control_grid_item_set) { // Populate the grid GridLibraryGrid.ItemsSource = sync_control_grid_item_set.grid_items; } }
protected override void OnClosed(EventArgs e) { base.OnClosed(e); // base.OnClosed() invokes this class' Closed() code, so we flipped the order of exec to reduce the number of surprises for yours truly. // This NULLing stuff is really the last rites of Dispose()-like so we stick it at the end here. try { sync_control_grid_item_set = null; DataContext = null; } catch (Exception ex) { Logging.Error(ex); } }