예제 #1
0
        /// <summary>Initializes a new instance of the <see cref="ViewDockGrid"/> class.</summary>
        public ViewDockGrid()
        {
            _dockMarkers = new GridDockMarkers(this);
            var bounds = ClientRectangle;

            bounds.X      += ViewConstants.Spacing;
            bounds.Y      += ViewConstants.Spacing;
            bounds.Width  -= ViewConstants.Spacing * 2;
            bounds.Height -= ViewConstants.Spacing * 2;
            RootHost       = new ViewHost(this, true, true, null)
            {
                Bounds = bounds,
                Anchor = ViewConstants.AnchorAll,
            };
            RootControl        = RootHost;
            _floatingViewForms = new LinkedList <FloatingViewForm>();
            PopupsStack        = new PopupNotificationsStack();

            SetStyle(ControlStyles.ContainerControl, true);

            SuspendLayout();
            RootHost.Parent = this;
            ResumeLayout(true);

            lock (_grids)
            {
                _grids.AddLast(this);
            }

            BackColor = ViewManager.Renderer.BackgroundColor;
        }