예제 #1
0
        protected override void OnContentChanged(object oldContent, object newContent)
        {
            base.OnContentChanged(oldContent, newContent);

            if (newContent != null)
            {
                DockTarget.SetDockContainer(newContent as DependencyObject, this);
            }
        }
예제 #2
0
        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;
                }
            }
        }