protected override void OnAttached() { base.OnAttached(); DockLayoutManager manager = AssociatedObject as DockLayoutManager; if (manager != null && !managers.Contains(manager)) { lock (managers) { foreach (var m in managers) { DockLayoutManagerLinker.Link(manager, m); } managers.Add(manager); } } }
protected override void OnDetaching() { DockLayoutManager manager = AssociatedObject as DockLayoutManager; if (manager != null && managers.Contains(manager)) { lock (managers) { foreach (var m in managers) { DockLayoutManagerLinker.Unlink(manager, m); } managers.Remove(manager); } } base.OnDetaching(); }