1

I have a ComponentOne numericbox in Silverlight 5 and I want the range to be from 0.000000000 to 999.999999999. So I set the max and min accordingly but when I run the app it allows me to enter 1000.00000000. Anyone know why this is? Is there a way around this? He is my code in the xaml:

<c1:C1NumericBox SelectOnFocus="Always" x:Name="interestrateNumericbox" 
AllowNull="True" Minimum="0.00000000" Maximum="999.99999999" Increment="0" 
Format="N8" ShowButtons="False" RangeValidationMode="Always" 
Value="{Binding Path=Model.InterestRate, Mode=TwoWay, 
UpdateSourceTrigger=PropertyChanged, 
Converter={StaticResource NullableDoubleToDouble}}" Height="26" 
HorizontalAlignment="Left" Width="308" VerticalAlignment="Bottom"     
d:LayoutOverrides="Height" />
Mr_Bont
  • 61
  • 4
  • I should add that the numbericbox is a control fro Component One. – Mr_Bont Sep 26 '13 at 14:38
  • it's probably related to the representation of floating-point values. You're trying to use too small a resolution, and i guess the bits representing 999.99999999 are the same with those representing 1000.00000000 – C.B. Sep 26 '13 at 16:40

1 Answers1

0

You are suggested to try using the latest build of the control and see if you still face any issues.

Next, a workaround for you is to set the maximum value again if the first digit entered is "1″. Following is the code for your reference :

void C1NumericBox1_ValueChanged(object sender, C1.Silverlight.PropertyChangedEventArgs<double> e)
        {

            if (e.NewValue == 1)
            {
                C1NumericBox1.Maximum = 999.99999999;

            }
        }
Mohita
  • 499
  • 3
  • 4