private void ElementsChanged(object container, ElementsChangedEventArgs ea) { var layoutItem = container as IElementContainer; if (layoutItem != null) { RemoveVisualChild(this.visual); this.visual = new ElementVisual(layoutItem); AddVisualChild(this.visual); } }
void control_ElementsChanged(object sender, ElementsChangedEventArgs e) { if (_currentPatchingControl != null) { _currentPatchingControl.UpdateElementDetails(_currentElementControl.SelectedElements); } if (e.Action == ElementsChangedEventArgs.ElementsChangedAction.Remove || e.Action == ElementsChangedEventArgs.ElementsChangedAction.Edit) { // TODO: this is iffy, should really redo the events for this system // TODO: The above should help a little with the iffiness of this, but I still question the brute force nature of this _currentControllersControl?.UpdatePatching(); } }
protected virtual void OnElementsChanged(object sender, ElementsChangedEventArgs ea) { ElementsChangedEventHandler handler = ElementsChanged; if (handler != null) handler(sender, ea); }