コード例 #1
0
        private void CreateChildren(IChildrenElement element, DockingAdapterMVVM adapter)
        {
            ContentControl control = new ContentControl()
            {
                Content = element
            };

            control.Name = element.Name;

            adapter.SetCanAutoHide(control as DependencyObject, element);
            adapter.SetCanClose(control as DependencyObject, element);
            adapter.SetCanDock(control as DependencyObject, element);
            adapter.SetCanDocument(control as DependencyObject, element);
            adapter.SetCanDrag(control as DependencyObject, element);
            adapter.SetCanFloat(control as DependencyObject, element);
            adapter.SetDesiredHeightInDockedMode(control as DependencyObject, element);
            adapter.SetDesiredWidthInDockedMode(control as DependencyObject, element);
            adapter.SetDockAbility(control as DependencyObject, element);
            adapter.SetDockToFill(control as DependencyObject, element);
            adapter.SetHeader(control as DependencyObject, element);
            adapter.SetNoDock(control as DependencyObject, element);
            adapter.SetNoHeader(control as DependencyObject, element);
            adapter.SetSideInDockedMode(control as DependencyObject, element);
            adapter.SetSideInFloatMode(control as DependencyObject, element);
            adapter.SetState(control as DependencyObject, element);
            adapter.SetTargetNameInDockedMode(control as DependencyObject, element);
            adapter.SetTargetNameInFloatMode(control as DependencyObject, element);

            adapter.PART_DockingManager.Children.Add(control);
        }