public void AddButton(string text) { var button = new RadioButton(Theme, Rectangle.Unused, text); button.Clicked += () => ButtonClicked(button); Buttons.Add(button); AddChild(button); if (Buttons.Count == 1) button.State.IsSelected = true; for (int i = 0; i < Buttons.Count; i++) Buttons[i].DrawArea = GetButtonDrawArea(i); }
private void ProcessButton(RadioButton button) { button.Clicked += () => ButtonClicked(button); AddChild(button); }
private void ButtonClicked(RadioButton clicked) { foreach (RadioButton button in Buttons) button.State.IsSelected = (button == clicked); }
public void SetUp() { centerButton = new RadioButton(Center, "Hello"); }