diff options
Diffstat (limited to 'Xamarin.PropertyEditing.Mac/Controls/NumericEditorControl.cs')
-rw-r--r-- | Xamarin.PropertyEditing.Mac/Controls/NumericEditorControl.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/NumericEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/NumericEditorControl.cs index 42f1257..5241742 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/NumericEditorControl.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/NumericEditorControl.cs @@ -105,7 +105,11 @@ namespace Xamarin.PropertyEditing.Mac protected override void UpdateValue() { - NumericEditor.Value = (double)Convert.ChangeType ((ViewModel).Value, typeof(double)); + if (underlyingType != null) { + NumericEditor.StringValue = ViewModel.Value == null ? string.Empty : ViewModel.Value.ToString (); + } else { + NumericEditor.Value = (double)Convert.ChangeType (ViewModel.Value, typeof (double)); + } } protected override void UpdateAccessibilityValues () |