protected override SizeF ArrangeOverride(SizeF finalSize) { //base.ArrangeOverride( finalSize); if (!this.RightToLeft) { minMaxCloseButtonsStackLayoutPanel.Arrange(new RectangleF(new PointF(finalSize.Width - minMaxCloseButtonsStackLayoutPanel.DesiredSize.Width, 0f), minMaxCloseButtonsStackLayoutPanel.DesiredSize)); ribbonTextAndContextGroupPanel.Arrange(new RectangleF(PointF.Empty, new SizeF(finalSize.Width - minMaxCloseButtonsStackLayoutPanel.DesiredSize.Width, finalSize.Height)));//new RectangleF(new PointF(finalSize.Width / 2f, 0f), ribbonTextAndContextGroupPanel.DesiredSize)); } else { minMaxCloseButtonsStackLayoutPanel.Arrange(new RectangleF(PointF.Empty, minMaxCloseButtonsStackLayoutPanel.DesiredSize)); ribbonTextAndContextGroupPanel.Arrange(new RectangleF(new PointF(minMaxCloseButtonsStackLayoutPanel.DesiredSize.Width, 0f), new SizeF(finalSize.Width - minMaxCloseButtonsStackLayoutPanel.DesiredSize.Width, finalSize.Height)));//new RectangleF(new PointF(finalSize.Width / 2f, 0f), ribbonTextAndContextGroupPanel.DesiredSize)); } return(finalSize); }
protected override SizeF ArrangeOverride(SizeF finalSize) { //fill.Arrange(new RectangleF(0, 0, finalSize.Width, finalSize.Height)); //layoutPanel.Arrange(new RectangleF( 0, 0, finalSize.Width, finalSize.Height)); base.ArrangeOverride(finalSize); RectangleF systemButtonsRectangle = new RectangleF(finalSize.Width - systemButtons.DesiredSize.Width - 3, 0, systemButtons.DesiredSize.Width, systemButtons.DesiredSize.Height); if (this.RightToLeft) { systemButtonsRectangle.X = 3; } systemButtons.Arrange(systemButtonsRectangle); return(finalSize); }