protected override System.Drawing.SizeF ArrangeOverride(System.Drawing.SizeF finalSize)
        {
            RectangleF clientRect = GetClientRectangle(finalSize);

            System.Windows.Forms.Padding border = GetBorderThickness(true);

            int   itemsCount = items.Count;
            float currentY   = clientRect.Top;

            for (int i = 0; i < itemsCount; i++)
            {
                RadItem          currentItem = items[i];
                BackstageTabItem tabItem     = (currentItem as BackstageTabItem);
                if (tabItem != null && tabItem == this.owner.SelectedItem)
                {
                    tabItem.Page.Visible = false;
                }

                currentItem.Arrange(new RectangleF(clientRect.X - border.Left, currentY,
                                                   clientRect.Width + border.Horizontal, currentItem.DesiredSize.Height));

                currentY += currentItem.DesiredSize.Height;
            }

            return(finalSize);
        }
        protected virtual void ArrangeContentCore(RectangleF clientRect)
        {
            if (this.toggleElement.Visibility != ElementVisibility.Collapsed)
            {
                this.toggleElement.Arrange(new RectangleF(new PointF(clientRect.X, clientRect.Y + (clientRect.Height - this.toggleElement.DesiredSize.Height) / 2), this.toggleElement.DesiredSize));
            }

            this.layoutManagerPart.Arrange(new RectangleF(
                                               clientRect.X + this.toggleElement.DesiredSize.Width, clientRect.Y,
                                               clientRect.Width - this.toggleElement.DesiredSize.Width, clientRect.Height));

            RadItem editorElement = this.GetEditorElement(editor);

            if (IsInEditMode && editorElement != null)
            {
                editorElement.Arrange(this.GetEditorArrangeRectangle(clientRect));
            }
        }
Example #3
0
        protected override SizeF ArrangeOverride(SizeF finalSize)
        {
            RectangleF clientRectangle = this.GetClientRectangle(finalSize);
            Padding    borderThickness = this.GetBorderThickness(true);

            this.backButtonElement.Arrange(new RectangleF(clientRectangle.Location, this.backButtonElement.DesiredSize));
            int   count = this.items.Count;
            float y     = clientRectangle.Top + this.backButtonElement.DesiredSize.Height;

            for (int index = 0; index < count; ++index)
            {
                RadItem          radItem          = this.items[index];
                BackstageTabItem backstageTabItem = radItem as BackstageTabItem;
                if (backstageTabItem != null && backstageTabItem == this.owner.SelectedItem)
                {
                    backstageTabItem.Page.Visible = false;
                }
                radItem.Arrange(new RectangleF(clientRectangle.X - (float)borderThickness.Left, y, clientRectangle.Width + (float)borderThickness.Horizontal, radItem.DesiredSize.Height));
                y += radItem.DesiredSize.Height;
            }
            return(finalSize);
        }
        protected override System.Drawing.SizeF ArrangeOverride(System.Drawing.SizeF finalSize)
        {
            RectangleF clientRect = GetClientRectangle(finalSize);
            RectangleF finalRect  = new RectangleF(PointF.Empty, finalSize);

            if (this.toggleElement.Visibility != ElementVisibility.Collapsed)
            {
                this.toggleElement.Arrange(new RectangleF(new PointF(clientRect.X, clientRect.Y + (clientRect.Height - this.toggleElement.DesiredSize.Height) / 2), this.toggleElement.DesiredSize));
            }

            finalRect.Width -= this.toggleElement.DesiredSize.Width;
            finalRect.X     += this.toggleElement.DesiredSize.Width;

            this.cellContainer.Arrange(finalRect);

            if (this.IsInEditMode)
            {
                RadItem editorElement = this.GetEditorElement(this.editor);
                editorElement.Arrange(this.GetEditorArrangeRectangle(clientRect));
            }

            return(finalSize);
        }
        protected virtual void ArrangeContentCore(RectangleF clientRect)
        {
            RectangleF toggleRectangle;
            RectangleF layoutManagerRect;

            this.GetArrangeRectangles(clientRect, out toggleRectangle, out layoutManagerRect);
            if (this.RightToLeft)
            {
                toggleRectangle   = LayoutUtils.RTLTranslateNonRelative(toggleRectangle, clientRect);
                layoutManagerRect = LayoutUtils.RTLTranslateNonRelative(layoutManagerRect, clientRect);
            }
            if (this.toggleElement.Visibility != ElementVisibility.Collapsed)
            {
                this.toggleElement.Arrange(toggleRectangle);
            }
            this.Layout.Arrange(layoutManagerRect);
            RadItem editorElement = this.GetEditorElement((IValueEditor)this.editor);

            if (!this.IsInEditMode || editorElement == null)
            {
                return;
            }
            editorElement.Arrange(this.GetEditorArrangeRectangle(clientRect));
        }