/// <summary> /// Disconnects everything inside this class /// </summary> public virtual void Disconnect() { /* lastItems = null; * UnsetDragFunctionality(); * onListCellDescription = null; * if (listadaptor != null) { * listadaptor.OnListChanged -= DSChanged; * listadaptor.OnElementAdded -= DSElementAdded; * listadaptor.OnElementChanged -= DSElementChanged; * listadaptor.OnElementRemoved -= DSElementRemoved; * listadaptor.OnTargetChange -= ListTargetChanged; * listadaptor.Disconnect(); * listadaptor = null; * }*/ if (CurrentSelection != null) { CurrentSelection.Disconnect(); currentSelection = null; } if (adaptor != null) { adaptor.Disconnect(); adaptor = null; } internalModel.Disconnect(); internalModel = null; // cachedItems = null; }
/// <summary> /// Disconnects everything inside this class /// </summary> public virtual void Disconnect() { if (CurrentSelection != null) { CurrentSelection.Disconnect(); currentSelection = null; } if (adaptor != null) { adaptor.Disconnect(); adaptor = null; } internalModel.Disconnect(); internalModel = null; }