MakeParent() public method

Make the provided control parented to ourself.
public MakeParent ( Control c ) : void
c System.Windows.Forms.Control Control to reparent.
return void
        /// <summary>
        /// Create the mode specific view hierarchy.
        /// </summary>
        /// <returns>View element to use as base of hierarchy.</returns>
        protected override ViewBase CreateStackCheckButtonView()
        {
            // Let base class do common stuff first
            base.CreateStackCheckButtonView();

            // Add the layout docker inside the border of the group
            _viewLayout = new ViewLayoutDocker();

            // Cache the border edge palette to use
            PaletteBorderEdge buttonEdgePalette = (Navigator.Enabled ? Navigator.StateNormal.BorderEdge :
                                                                       Navigator.StateDisabled.BorderEdge);

            // Create the scrolling viewport and pass in the _viewLayout as the content to scroll
            _viewScrollViewport = new ViewLayoutScrollViewport(Navigator, _viewLayout, buttonEdgePalette, null,
                                                               PaletteMetricPadding.None, PaletteMetricInt.None,
                                                               VisualOrientation.Top, RelativePositionAlign.Near,
                                                               Navigator.Stack.StackAnimation,
                                                               (Navigator.Stack.StackOrientation == Orientation.Vertical),
                                                               NeedPaintDelegate);

            // Reparent the child panel that contains the actual pages, into the child control
            _viewScrollViewport.MakeParent(Navigator.ChildPanel);

            // Create the top level group view
            _viewGroup = new ViewDrawDocker(Navigator.StateNormal.HeaderGroup.Back,
                                            Navigator.StateNormal.HeaderGroup.Border);

            // Fill the group with the scrolling viewport
            _viewGroup.Add(_viewScrollViewport, ViewDockStyle.Fill);

            // Put the old root as the filler inside the group
            _viewLayout.Add(_oldRoot, ViewDockStyle.Fill);

            // Define the top level view to become the new root
            return _viewGroup;
        }
        /// <summary>
        /// Create the mode specific view hierarchy.
        /// </summary>
        /// <returns>View element to use as base of hierarchy.</returns>
        protected override ViewBase CreateStackCheckButtonView()
        {
            // Let base class do common stuff first
            base.CreateStackCheckButtonView();

            // Layout contains all the stack elements
            _viewLayout = new ViewLayoutDocker();

            // Cache the border edge palette to use
            PaletteBorderEdge buttonEdgePalette = (Navigator.Enabled ? Navigator.StateNormal.BorderEdge :
                                                                       Navigator.StateDisabled.BorderEdge);

            // Create the scrolling viewport and pass in the _viewLayout as the content to scroll
            _viewScrollViewport = new ViewLayoutScrollViewport(Navigator, _viewLayout, buttonEdgePalette, null,
                                                               PaletteMetricPadding.None, PaletteMetricInt.None,
                                                               VisualOrientation.Top, RelativePositionAlign.Near,
                                                               Navigator.Stack.StackAnimation,
                                                               (Navigator.Stack.StackOrientation == Orientation.Vertical),
                                                               NeedPaintDelegate);

            // Reparent the child panel that contains the actual pages, into the child control
            _viewScrollViewport.MakeParent(Navigator.ChildPanel);

            // Create the header group and fill with the view layout
            _headerGroup = new ViewletHeaderGroup(Navigator, Redirector, NeedPaintDelegate);
            ViewBase newRoot = _headerGroup.Construct(_viewScrollViewport);

            // Put the old root as the filler inside stack elements
            _viewLayout.Add(_oldRoot, ViewDockStyle.Fill);

            return newRoot;
        }