protected override void OnContentChanged(object oldContent, object newContent) { base.OnContentChanged(oldContent, newContent); if (newContent != null) { DockTarget.SetDockContainer(newContent as DependencyObject, this); } }
protected override void OnContentChanged(object oldContent, object newContent) { base.OnContentChanged(oldContent, newContent); if (newContent != null) { DockTarget.SetDockContainer(newContent as DependencyObject, this); DockContent content = newContent as DockContent; if (!double.IsNaN(content.Width)) { Width = content.Width; content.Width = double.NaN; } if (!double.IsNaN(content.Height)) { //Height = content.Height; content.Height = double.NaN; } } }