This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
The PercentageTextBox has a few oddities in the WPF Elements 5.1 release. 1) The border/outline of the control does not change size when the control is sized. Explicitly setting the width to 150 pixels for example, has no effect. All other numerical controls are justified left. 2) Zeros cannot be typed in as the first numeral in the control. For example, if the desired value is 0.01, this is impossible because after inputting a decimal point, the control will not accept zero as an input. This is despite changing the number of decimal digits to 3 or greater. |
|
|
Hello 1) I have not been able to reproduce this at my end. Are you using the generic theme or one of the other built in themes? What is the layout structure that the control is hosted within? 2) I have reproduced this in a way, but it may be slightly different to what you have done. Typing in "0.01" into the control works fine, but typing ".01" caused an issue. Pressing zero still put the zero in the text box correctly: ".0". But then pressing 1 replaced the zero like this ".1". This bug has been fixed and can be downloaded through the next nightly build. Let me know if this hasn't resolved the issue you observed. If the problem remains, please send the xaml code showing the properties you are setting on the control. Jason Fauchelle |
|
|
As of nightly build of WPF Elements 5 dated 12 June 2012, I'm still having both of these issues. Some more information on reproduction of said issues: 1) The percentage textbox sizes properly when set to HorizontalAlignment="Center", but the stated behavior occurs when the control is right-aligned. A xaml snippet is below.
2)The behavior of the PercentageTextBox is still exactly as described initially on this end, having the parameters in the xaml above. It is bound to a double value in the view model. The initial value of the double is 0.015. If you select the initial value, hit backspace, and attempt to input a zero, it does not work. A decimal point can be input, but no zero can follow it (though 1-9 can). I suspect that this is because we have a non-zero minimum set, and the value is being constantly tested for this condition, rather than waiting for lost focus to commit the value. |
|
|
Hello 1) Thanks for the code snippet, this issue will be resolved in the next nightly build. 2) You are correct that the range constraint logic is constantly being applied. This is the default behavior. You can change this by setting the RangeConstraintMode property to either OnLostFocus or OnLostFocusOrReturn. You don't need to wait for the next nightly build for this one. Jason Fauchelle |
|
|
The June 13 nightly fixed the layout issue, and RangeConstraintMode solves the second issue. Thanks! |
|