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
|
Situation: Using the NumericEditor control in a DataTemplate that is displayed in a ContentPresenter with a DataTemplateSelector. When I change between DataTemplates in the SelectTemplate I get an ArgumentOutOfRangeException because the DecimalPlaces property has been reset to the DependenyProperty defualt of -1. Not sure if this is happening on deinit or the lost focus of the control as the stack trace doesn't give much more information except that it was a property changed event. I have investigate the issue in source code, and found that IF I set the DecimalPlacesProperty default value to 0 instead of -1 it will no longer crash. Is this a valid solution? or have misunderstood the reason why the default value is invalid. If it is can you put it into the next nightly build.
cheers,
|
|
|
This was a bug and will be fixed in the 23 June nightly build, available from about 1430 GMT. Please let us know if you still see problems. The workaround of setting DecimalPlaces to 0 instead of -1 may or may not be a valid solution depending on your settings and on what you want to achieve. 0 means no decimal places at all; -1 means the culture default number of decimal places. So these will typically result in different behaviour. |
|
|
Thanks Ivan. I knew there was a reason for -1 and that the real issue was somewhere else. |
|