Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1320
XamNumericInput cannot bind ValueConstraint MaxInclusive value
posted

Hi,

I'm using version 13.1.

I've the following code and the binding with ToleranceMaxValue does not work :

<ig:XamNumericInput x:Name="ToleranceNumEd" InvalidValueBehavior="RevertValue" Mask="nn" SpinButtonDisplayMode="Focused" Width="50" Height="21" Value="{Binding Path=SearchCriteria.Tolerance, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ValueType="sys:Int32" IsEnabled="{Binding Path=IsToleranceEnabled}">
 <ig:XamNumericInput.ValueConstraint>
        	<ig:ValueConstraint MinInclusive="1" MaxInclusive="{Binding Path=ToleranceMaxValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Nullable="True" ValidateAsType="UnsignedInteger32" />
        ig:XamNumericInput.ValueConstraint> ig:XamNumericInput>
In my ViewModel :
private object _toleranceMaxValue;
 
public object ToleranceMaxValue
{
 get { return _toleranceMaxValue; }
        set { _toleranceMaxValue = value; RaisePropertyChanged(() => this.ToleranceMaxValue); }
}
Do you have an alternative ?
Thanks
  • 138253
    Offline posted

    Hello,

     

    I am just checking if you got this worked out or you still require any assistance or clarification on the matter.

  • 138253
    Offline posted

    Hello,

     

    Thank you for your post. I have been looking into it and I can say that this behavior is expected, because the ValueConstraint is not an element in the visual tree of the application and cannot be data bound. I can suggest you see this two forum threads:

     

    http://es.infragistics.com/community/forums/p/39023/222530.aspx

    and

    http://es.infragistics.com/community/forums/t/37011.aspx

     

    where there are workaround for this functionality. They are implemented for the XamEditors, but the logic for the XamNumericInput is the same. Please let me know if this helps you or you need further assistance on this matter.

     

    Looking forward for your reply.