protected override Size ArrangeOverride(Size finalSize) { var singleColSize = new ColumnMeasure(finalSize); var sorter = CalendarBarSorter(PlaceSingleItem); rowHeights = sorter.SortDates(NonCollapsedChildren()); return(new Size(finalSize.Width, sorter.TotalHeight)); double PlaceSingleItem(FrameworkElement item, int column, int width, double yOffset) { item.Arrange(new Rect(singleColSize.ColumnOffset(column), yOffset, singleColSize.MultiColWidth(width), item.DesiredSize.Height)); return(item.DesiredSize.Height); } }
public Rect RectangleFromPoint(Point point) { var(col, row) = PointToGridPosition(point); return(new Rect(columnMeasure.ColumnOffset(col), RowOffset(row), columnMeasure.MultiColWidth(1), rowHeights[row])); }