Example #1
0
		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);
		}
Example #2
0
		private void ProcessButton(RadioButton button)
		{
			button.Clicked += () => ButtonClicked(button);
			AddChild(button);
		}
Example #3
0
		private void ButtonClicked(RadioButton clicked)
		{
			foreach (RadioButton button in Buttons)
				button.State.IsSelected = (button == clicked);
		}
Example #4
0
 public void SetUp()
 {
     centerButton = new RadioButton(Center, "Hello");
 }