public PhoneLayoutButton AddButton(string id) { for (int i = 0; i < Buttons.Count; i++) { if (Buttons[i].Id == id) { throw new Exception(); } } PhoneLayoutButton button = new PhoneLayoutButton(); button.Text = "Button"; button.IsEnabled = true; button.Id = id; button.X = 110; button.Y = 200; AddButton(button); return(button); }
public void AddButton(PhoneLayoutButton button) { Buttons.Add(button); }