public ListBox(string styleName = Stylesheet.DefaultStyleName) : base(new ScrollViewer()) { _box = new VerticalStackPanel(); InternalChild.Content = _box; SetStyle(styleName); }
public ComboBox(string styleName = Stylesheet.DefaultStyleName) : base(new ImageTextButton(null)) { InternalChild.Toggleable = true; InternalChild.PressedChanged += InternalChild_PressedChanged; HorizontalAlignment = HorizontalAlignment.Left; VerticalAlignment = VerticalAlignment.Top; _itemsContainer = new VerticalStackPanel(); _itemsContainerScroll = new CustomScrollViewer { Content = _itemsContainer }; DropdownMaximumHeight = 300; SetStyle(styleName); }
private void BuildUI() { _checkBoxWidgetFrames = new CheckBox(); _checkBoxWidgetFrames.Text = "Draw green frame around every widget"; _checkBoxWidgetFrames.Id = "_checkBoxWidgetFrames"; _checkBoxKeyboardFocusedWidgetFrame = new CheckBox(); _checkBoxKeyboardFocusedWidgetFrame.Text = "Draw red frame around the keyboard focused widget"; _checkBoxKeyboardFocusedWidgetFrame.Id = "_checkBoxKeyboardFocusedWidgetFrame"; _checkBoxMouseWheelFocusedWidgetFrame = new CheckBox(); _checkBoxMouseWheelFocusedWidgetFrame.Text = "Draw yellow frame around the mouse wheel focused widget"; _checkBoxMouseWheelFocusedWidgetFrame.Id = "_checkBoxMouseWheelFocusedWidgetFrame"; _checkBoxGlyphFrames = new CheckBox(); _checkBoxGlyphFrames.Text = "Draw white frame around every TextBox letter glyph"; _checkBoxGlyphFrames.Id = "_checkBoxGlyphFrames"; _checkBoxDisableClipping = new CheckBox(); _checkBoxDisableClipping.Text = "Disable clipping"; _checkBoxDisableClipping.Id = "_checkBoxDisableClipping"; Root = new VerticalStackPanel(); Root.Id = "Root"; Root.Widgets.Add(_checkBoxWidgetFrames); Root.Widgets.Add(_checkBoxKeyboardFocusedWidgetFrame); Root.Widgets.Add(_checkBoxMouseWheelFocusedWidgetFrame); Root.Widgets.Add(_checkBoxGlyphFrames); Root.Widgets.Add(_checkBoxDisableClipping); Title = "Debug Options"; Left = 263; Top = 151; Content = Root; }