diff options
author | Eric Maupin <ermaup@microsoft.com> | 2019-10-17 01:13:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-17 01:13:54 +0300 |
commit | 9dc5296c7a3b44fc475f7813fca4ef0f4ff5324c (patch) | |
tree | f0c4c83274737c034067722dff046e1967c07182 /Xamarin.PropertyEditing.Mac | |
parent | da4f83a9e6cf83631192ec21e96cb941f8f0b21a (diff) | |
parent | c1954c6c35b6983a08a62638b93e02f33e480e2a (diff) |
Merge pull request #670 from xamarin/decriptor-fix-customexpressionview-crash
[Mac] CustomExpressionView always set editorControl
Diffstat (limited to 'Xamarin.PropertyEditing.Mac')
-rw-r--r-- | Xamarin.PropertyEditing.Mac/Controls/CustomExpressionView.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/CustomExpressionView.cs b/Xamarin.PropertyEditing.Mac/Controls/CustomExpressionView.cs index ed82e78..af435dc 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/CustomExpressionView.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/CustomExpressionView.cs @@ -33,13 +33,13 @@ namespace Xamarin.PropertyEditing.Mac NSControl editorControl = null; PropertyInfo customAutocompleteItemsPropertyInfo = vmType.GetProperty (AutocompleteItemsString); if (customAutocompleteItemsPropertyInfo.GetValue (viewModel) is ObservableCollectionEx<string> values) { - if (values != null && values.Count > 0) { + if (values != null && values.Count > 0) editorControl = new AutocompleteComboBox (hostResources, viewModel, values, previewCustomExpressionPropertyInfo); - } else { - editorControl = new NSTextField (); - } } + if (editorControl == null) + editorControl = new NSTextField (); + editorControl.TranslatesAutoresizingMaskIntoConstraints = false; editorControl.StringValue = (string)value ?? string.Empty; |