Exemplo n.º 1
0
 protected LevelGridButton AddItem(LevelGridItem item)
 {
     LevelGridButton button = new LevelGridButton() { DataContext = item };
     _buttons.Add(button);
     button.Delete += OnItemDelete;
     button.Edit += OnItemEdit;
     ButtonGrid.Children.Add(button);
     return button;
 }
Exemplo n.º 2
0
 protected void SetGrid(LevelGridButton button, LevelGridItem item)
 {
     Grid.SetRow(button, item.YCord);
     Grid.SetColumn(button, item.XCord);
     Grid.SetRowSpan(button, item.GridHeight);
     Grid.SetColumnSpan(button, item.GridWidth);
 }