diff options
author | nosami <jasonimison@gmail.com> | 2019-11-04 16:09:23 +0300 |
---|---|---|
committer | monojenkins <jo.shields+jenkins@xamarin.com> | 2019-11-04 18:35:14 +0300 |
commit | 60874ed2f9cf1dd9b3686d7fd8acdb8fb9d6a231 (patch) | |
tree | 70b524f27da7782314123e026dcc70b60e775090 /main/src/addins/MonoDevelop.AspNetCore/MonoDevelop.AspNetCore.Scaffolding/ScaffolderTemplateConfigurePage.cs | |
parent | 8ba358ed73d6b26b66884b60ef479df97a598b1c (diff) |
Set field value for ComboBoxEntry.TextEntry.Changed
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1012524
Diffstat (limited to 'main/src/addins/MonoDevelop.AspNetCore/MonoDevelop.AspNetCore.Scaffolding/ScaffolderTemplateConfigurePage.cs')
-rw-r--r-- | main/src/addins/MonoDevelop.AspNetCore/MonoDevelop.AspNetCore.Scaffolding/ScaffolderTemplateConfigurePage.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/main/src/addins/MonoDevelop.AspNetCore/MonoDevelop.AspNetCore.Scaffolding/ScaffolderTemplateConfigurePage.cs b/main/src/addins/MonoDevelop.AspNetCore/MonoDevelop.AspNetCore.Scaffolding/ScaffolderTemplateConfigurePage.cs index 08c7d4c9d7..f873ce6980 100644 --- a/main/src/addins/MonoDevelop.AspNetCore/MonoDevelop.AspNetCore.Scaffolding/ScaffolderTemplateConfigurePage.cs +++ b/main/src/addins/MonoDevelop.AspNetCore/MonoDevelop.AspNetCore.Scaffolding/ScaffolderTemplateConfigurePage.cs @@ -62,7 +62,9 @@ namespace MonoDevelop.AspNetCore.Scaffolding case ComboField comboField: ComboBox comboBox; if (comboField.IsEditable) { - comboBox = new ComboBoxEntry (); + var comboBoxEntry = new ComboBoxEntry (); + comboBoxEntry.TextEntry.Changed += (sender, args) => comboField.SelectedValue = comboBoxEntry.TextEntry.Text; + comboBox = comboBoxEntry; } else { comboBox = new ComboBox (); } @@ -79,6 +81,7 @@ namespace MonoDevelop.AspNetCore.Scaffolding comboBox.TextInput += (sender, args) => comboField.SelectedValue = comboBox.SelectedText; comboBox.SelectionChanged += (sender, args) => comboField.SelectedValue = comboBox.SelectedText; + if (comboBox.Items.Count > 0) comboBox.SelectedIndex = 0; break; |