Binding errors on screen load

151 Views Asked by At

I'm using IntegerUpDown from the WPF toolkit and I'm binding the minimum, maximum, and value properties.

When the view loads, some of the values in the IntegerUpDown control display "0" (invalid input which I can't touch) even though the minimum is set via the binding to "1" (I can't touch this either).

Why does this happens? Why doesn't the minimum enforces the minimum check on screen load? When I scroll down the view probably refreshes as then the app crashes.

Any idea on this issue will be great

1

There are 1 best solutions below

0
On BEST ANSWER

I ran a test: I added a converter to each property and found that the order of the properties when writing the control in xaml is the order how they are bound. My control was written as follow:

<toolkit:IntegerUpDown Value="binding" Min="binding" Max="binding"/>

Once I inverted the order of the properties as follow:

<toolkit:IntegerUpDown Min="binding" Max="binding" Value="binding"/>

The screen crashes on load as expected.

Hope this helps.