protected override void ArrangeContentCells( int xCellSize, int yCellSize, int xOffset, int yOffset) { PointF empty = PointF.Empty; for (int row = 0; row < this.Rows; ++row) { empty.Y += row > 0 ? (float)yCellSize : (float)yOffset; empty.Y += (float)this.verticalCellSpacing; empty.X = 0.0f; for (int column = 0; column < this.Columns; ++column) { LightVisualElement element = this.GetElement(row, column); if (element != null) { empty.X += column > 0 ? (float)xCellSize : (float)xOffset; empty.X += (float)this.horizontalCellSpacing; element.Arrange(new RectangleF(empty, new SizeF((float)xCellSize, (float)yCellSize))); } } } }
protected override void ArrangeContentCells(int xCellSize, int yCellSize, int xOffset, int yOffset) { PointF position = PointF.Empty; for (int i = 0; i < this.Rows; i++) { position.Y += i > 0 ? yCellSize : yOffset; position.Y += this.verticalCellSpacing; position.X = 0; for (int j = 0; j < this.Columns; j++) { LightVisualElement cell = null; cell = this.GetElement(i, j); if (cell == null) { continue; } position.X += j > 0 ? xCellSize : xOffset; position.X += this.horizontalCellSpacing; cell.Arrange(new RectangleF(position, new SizeF(xCellSize, yCellSize))); } } }
protected override SizeF ArrangeOverride(SizeF finalSize) { var result = base.ArrangeOverride(finalSize); var rectangle = new RectangleF(finalSize.Width - removeButton.DesiredSize.Width, 0, removeButton.DesiredSize.Width, removeButton.DesiredSize.Height); removeButton.Arrange(rectangle); return(result); }
internal float ArrangeImageElement( SizeF finalSize, LightVisualElement imageElement, float pageHeaderHeight) { float num1 = imageElement.BackgroundShape != null ? (float)imageElement.BackgroundShape.Image.Size.Width : 0.0f; float width = (imageElement.Image != null ? imageElement.DesiredSize.Width : num1) * this.DpiScaleFactor.Width; float x = !this.RightToLeft ? 0.0f : finalSize.Width - width; float num2 = (double)this.CommandAreaHeight > -1.0 ? this.CommandAreaHeight : this.commandArea.DesiredSize.Height; RectangleF finalRect = new RectangleF(x, pageHeaderHeight, width, finalSize.Height - pageHeaderHeight - num2); imageElement.Visibility = ElementVisibility.Visible; imageElement.Arrange(finalRect); return(width); }
internal float ArrangeImageElement(SizeF finalSize, LightVisualElement imageElement, float pageHeaderHeight) { float backgroundShapeWidth = imageElement.BackgroundShape != null ? imageElement.BackgroundShape.Image.Size.Width : 0; float width = imageElement.Image != null ? imageElement.DesiredSize.Width : backgroundShapeWidth; float x; if (this.RightToLeft) { x = finalSize.Width - width; } else { x = 0; } float commandAreaHeight = this.CommandAreaHeight > -1 ? this.CommandAreaHeight : this.commandArea.DesiredSize.Height; RectangleF imageRect = new RectangleF(x, pageHeaderHeight, width, finalSize.Height - pageHeaderHeight - commandAreaHeight); imageElement.Visibility = ElementVisibility.Visible; imageElement.Arrange(imageRect); return(width); }