I would like for the range to be from 0 to 2150 -- why doesn't this work?
<igEditors:XamNumericEditor Name="txtSpeed" Width="50" Text="{Binding Path=EngineTest.Speed}" Mask="nnnn" EditModeStarted="Numeric_EditModeStarted"> <igEditors:ValueConstraint ValidateAsType="Integer32" MinInclusive="0" MaxInclusive="2150"></igEditors:ValueConstraint> </igEditors:XamNumericEditor>
You should set the ValidateAsType to a type from the System namespace, mscorlib assemly like this:
xmlns:sys="clr-namespace:System;assembly=mscorlib"
...
ValidateAsType={x:Type sys:Int32}
The value constraints will be validate the value when it is changed, so if you have bound the XamNumericEditor to a value that is not valid according to these constraints, it will not be validated.
Does this look right, because I am received an error. I am not sure if the error means that Int32 is not a valid value or Int32 is not an acceptable value for the value constraint...:
<igEditors:XamNumericEditor Name="txtSpeed" Width="50" Text="{Binding Path=EngineTest.Speed}" Mask="nnnn" EditModeStarted="Numeric_EditModeStarted"> <!--Example did not work, but will keep available for reference later.--> <igEditors:ValueConstraint ValidateAsType="{x:Type sys:Int32}" MinInclusive="0" MaxInclusive="2101"></igEditors:ValueConstraint> </igEditors:XamNumericEditor>
ERROR:
System.Windows.Markup.XamlParseException occurred Message="'Int32' value cannot be assigned to property 'ValidateAsType' of object 'Infragistics.Windows.Editors.ValueConstraint'. 'System.Int32' is not a valid value for property 'ValidateAsType'. Error at object 'Infragistics.Windows.Editors.ValueConstraint' in markup file 'eFSR.Client;component/contentcontrols/fsreportdetails.xaml' Line 534 Position 80." Source="PresentationFramework"
My xaml for the entire page is 1200 lines -- I am not really sure what else to provide. Are you sure it's not related to the binding?
travich said:you sure it's not related to the binding?
Still having the same issue -- let me try a few things and let you know.
Removing the binding does not seem to affect whether or not this control works for me. Here's the latest configuration of the contorl.
<igEditors:XamNumericEditor Name="txtSpeed" Width="50" Text="{Binding Path=EngineTests[0].Speed}" EditModeStarted ="Numeric_EditModeStarted"><igEditors:ValueConstraint ValidateAsType="Integer32" MinExclusive="1" MaxExclusive="2100"></igEditors:ValueConstraint ></igEditors:XamNumericEditor >
I overlooked:
>