void AddTechnoItems() { foreach (TechnoLine tl in manager.TechnoLines) { foreach (YearItem yt in tl.YearItems) { TechnoControl newTC= new TechnoControl() { DataContext=yt, HorizontalAlignment= HorizontalAlignment.Center, VerticalAlignment= VerticalAlignment.Center }; Grid.SetRow(newTC,1); Grid.SetColumn(newTC,tl.ID-1); mainGrid.Children.Add(newTC); yt.PropertyChanged += yt_PropertyChanged; } } }
void AddTechnoItems() { foreach (TechnoLine tl in manager.TechnoLines) { foreach (YearItem yt in tl.YearItems) { TechnoControl newTC = new TechnoControl() { DataContext = yt, HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center }; Grid.SetRow(newTC, 1); Grid.SetColumn(newTC, tl.ID - 1); mainGrid.Children.Add(newTC); yt.PropertyChanged += yt_PropertyChanged; } } }