I am trying to use XamNumericEditor to achieve the following:
I want to limit input to be a nullable decimal number - when I blank the field, the decimal? bound to the control is set to null.
I want the control to be an optional field - right now, the control shows a red boarder when it has not been filled in, indicating to the user this is a required field.
Here is the XAML I currently have, but does not work based on the features above (note Config.MaxErrorPercent is a decimal? type):
<igEditors:XamNumericEditor Text="{Binding Config.MaxErrorPercent, Mode=TwoWay}" Mask="nnn.nnnnnnnnnnnnnnnnnn" Format="###.##################" HorizontalContentAlignment="Right" HorizontalAlignment="Center" VerticalAlignment="Center" Width="50" Margin="5"> <igEditors:XamNumericEditor.ValueConstraint> <igEditors:ValueConstraint MinInclusive="0" MaxInclusive="100" Nullable="True" ValidateAsType="Decimal"/> </igEditors:XamNumericEditor.ValueConstraint> </igEditors:XamNumericEditor>