public DropdownList(Theme theme, Rectangle drawArea, List<object> values) : base(theme, theme.DropdownListBox, drawArea) { var selectBox = new SelectBox(theme, new Rectangle(drawArea.Left, drawArea.Top + drawArea.Height, drawArea.Width, drawArea.Height), values) { IsVisible = false }; selectBox.LineClicked += SelectNewValue; Add(selectBox); AddChild(selectBox); Values = values; Clicked += ToggleSelectionBoxVisibility; FontText.HorizontalAlignment = HorizontalAlignment.Left; }
public DropdownList(Theme theme, Rectangle drawArea, List <object> values) : base(theme, theme.DropdownListBox, drawArea) { var selectBox = new SelectBox(theme, new Rectangle(drawArea.Left, drawArea.Top + drawArea.Height, drawArea.Width, drawArea.Height), values) { IsVisible = false }; selectBox.LineClicked += SelectNewValue; Add(selectBox); AddChild(selectBox); Values = values; Clicked += ToggleSelectionBoxVisibility; FontText.HorizontalAlignment = HorizontalAlignment.Left; }
private void ProcessSelectBox(SelectBox selectBox) { selectBox.LineClicked += SelectNewValue; AddChild(selectBox); }
public void SetUp() { selectBox = new SelectBox(Center, Values); }