public EquationExpressionBox(EquationField parentField) { ParentField = parentField ?? throw new ArgumentNullException(nameof(parentField)); InitializeComponent(); InputBox.ShowName = false; InputBox.PropertyChanged += (s, e) => { ExpressionField.InputBox_PropertyChanged(s, e, ResultBox, StateImage); }; }
private void AddNewField(AppState state) { var field = new ExpressionField(); field.InputBox.VariableName = state.GenerateFieldName().ToString(); var listItem = new ListViewItem { HorizontalContentAlignment = HorizontalAlignment.Stretch, Content = field, ContextMenu = field.ContextMenu }; FieldItemList.Add(listItem); }