Beispiel #1
0
        public void Paint(
            DimensionHierarchy horizontalHierarchy,
            DimensionHierarchy verticalHierarchy,
            GridPosition startPosition)
        {
            var placement = new ZigZagPlacement(startPosition, GridOrientation.Horizontal);

            foreach (var verticalFactKey in verticalHierarchy.Keys)
            {
                foreach (var horizontalFactKey in horizontalHierarchy.Keys)
                {
                    var factKey  = horizontalFactKey.Merge(verticalFactKey);
                    var fact     = FindFact(factKey);
                    var factItem = _itemFactory.CreateFactItem(fact);
                    _grid.Children.Add(factItem);
                    placement.ApplySlot(factItem);
                    placement.NextSlot();
                }
                placement.NextLevel();
            }
        }