/// <summary> /// Creates UIElement of RangeSliderControl which is a <see cref="LayoutPanel"/> containing a /// slider with two thumbs, a label and text boxes corresponding to the min and max values. /// </summary> public override void CreateUIElement() { var panel = allowText ? new LayoutPanel(1, 4) : new LayoutPanel(1, 2); AddLabel(panel); if (allowText) { AddMinText(panel); AddSlider(panel); AddMaxText(panel); } else { AddSlider(panel); } Value = Input.GetInput("Value", new Dictionary <string, float> { { "min", min }, { "max", max } }); panel.ChangeDimension(80, 800); UtilityMethods.SetPanelResources(panel); UIElement = panel; minErrorToolTip = new ToolTip(); minErrorToolTip.Style = UIConstants.GetErrorToolTipStyle(); maxErrorToolTip = new ToolTip(); maxErrorToolTip.Style = UIConstants.GetErrorToolTipStyle(); }
/// <summary> /// Creates the string UI Element /// Initializes the layout and updates the UIElement /// </summary> public override void CreateUIElement() { Label = new Label(); Label.Content = Input.GetInput("Label", "Input").ToString(); TextBox = new TextBox(); TextBox.LostFocus += this.HandleTextChanged; //var panel = new StackPanel() { Orientation = Orientation.Horizontal }; //panel.Children.Add(Label); //panel.Children.Add(TextBox); var panel = new LayoutPanel(1, 2); panel.Add(Label, 1); panel.Add(TextBox, 1); panel.ChangeDimension(40, 300); ErrorToolTip = new ToolTip(); ErrorToolTip.Style = UIConstants.GetErrorToolTipStyle(); UtilityMethods.SetPanelResources(panel); Validate(Input.GetInput("Value")); UIElement = panel; }
public override void CreateUIElement() { var panel = allowText ? new LayoutPanel(1, 3) : new LayoutPanel(1, 2); panel.ChangeDimension(60, 800); AddLabel(panel); AddSlider(panel); AddText(panel); this.value = min; Value = Input.GetInput("Value", Value); UtilityMethods.SetPanelResources(panel); UIElement = panel; ErrorToolTip = new ToolTip(); ErrorToolTip.Style = UIConstants.GetErrorToolTipStyle(); }