Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all

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


Note: The data is received from a server which can communicate with a parent application where in some cases this value is valid. I hope if I'll know what is causing this I'll know how to solve this the "right" way.
Posted
Updated 10-Dec-12 9:31am
v3
Comments
Sergey Alexandrovich Kryukov 10-Dec-12 17:50pm    
Idea? Sure: provide some code sample.
--SA

1 solution

XML
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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900