UIElement[] CreateUIElements(ISimpleAppOptionTextBox option) { var tb = new TextBox { Text = option.Value, ToolTip = option.ToolTip }; var lbl = new Label { Content = option.Text, Target = tb, ToolTip = option.ToolTip }; tb.TextChanged += (s, e) => option.Value = tb.Text; return(new UIElement[] { lbl, tb }); }
UIElement[] CreateUIElements(ISimpleAppOptionTextBox option) { var tb = new TextBox { Text = option.Value, ToolTip = option.ToolTip }; var lbl = new Label { Content = option.Text, Target = tb, ToolTip = option.ToolTip }; tb.TextChanged += (s, e) => option.Value = tb.Text; return new UIElement[] { lbl, tb }; }