internal void SetSibling(DockPaneNode node, DockPaneNode newValue) { Debug.Assert(Child1 == node || Child2 == node); Debug.Assert(newValue != null); Debug.Assert(newValue.Parent == null); if (Child1 == node) { SetValue(Child2PropertyKey, newValue); } else { SetValue(Child1PropertyKey, newValue); } newValue.SetParent(this); }
private void SetRootNode(DockPaneNode newValue, bool clearOldValueParent) { DockPaneNode oldValue = RootNode; if (oldValue == newValue) { return; } SetValue(RootNodePropertyKey, newValue); if (oldValue != null && clearOldValueParent) { oldValue.ClearParent(); } if (newValue != null) { newValue.SetParent(this); } }