public void RemoveContent(DarkDockContent dockContent) { if (!_contents.Contains(dockContent)) { return; } // check if no cancelled Boolean cancel = new Boolean(false); ContentRemoving?.Invoke(this, new DockContentRemovingEventArgs(dockContent, cancel)); if (cancel.Value) { return; } dockContent.DockPanel = null; _contents.Remove(dockContent); var region = _regions[dockContent.DockArea]; region.RemoveContent(dockContent); ContentRemoved?.Invoke(this, new DockContentEventArgs(dockContent)); }
private void fire_ContentRemoved(InputTypes type, string title, string input) { if (ContentRemoved != null) { try { ContentRemoved.Invoke(this, new InputEventArgs(type, title, input)); } catch { } } }
public void RemoveContent(DarkDockContent dockContent) { if (!_contents.Contains(dockContent)) { return; } dockContent.DockPanel = null; _contents.Remove(dockContent); var region = _regions[dockContent.DockArea]; region.RemoveContent(dockContent); ContentRemoved?.Invoke(this, new DockContentEventArgs(dockContent)); }