Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected override Size ArrangeOverride(Size finalSize)
- {
- int row, column;
- double x, y, height, width;
- for (int i = 0; i < this.Children.Count; i++)
- {
- height = this.Children[i].DesiredSize.Height;
- width = COS_30_DEGREE * height;
- row = HoneycombPanel.GetRow(this.Children[i]);
- column = HoneycombPanel.GetColumn(this.Children[i]);
- x = row % 2 == 0 ? column * width : (0.5 * width + column * width);
- y = 0.75 * row * height;
- this.Children[i].Arrange(new Rect(new Point(x, y), this.Children[i].DesiredSize));
- }
- return base.ArrangeOverride(finalSize);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement