PointEditBox NaN is missing in latest version

Editors for WPF Forum

Posted 7 years ago by Brian Pratt
Version: 17.2.0664
Avatar

We used to use .allowNaN = true   in previous versions of Actipro PointEditBox to make it so users knew that x or y was different.

In our case, we were using it in a property grid, and if multiple objects were selected, if they had different x or y values, we set that value to NaN.  The editor would look like this (object #1 was at (1,1)  while object #2 was at (1,2)):

Position [ 1, NaN ] 

It made it semi-clear to the user that 1 was a shared value between the two objects, while NaN meant that they had different values.

 

At some point in 2017, you removed the ability to use allowNaN in PointEditBox.  Do you have an alternative for me?

I just want to set a value for either x or y that shows in the editor that is not a number, but still changable to a number.  Something like (123, ??) or (123, --).

You allowNull, but only on the entire point, not the individual point .x .y.

 

Thanks,

Brian

Comments (3)

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Brian,

In the property grid scenario you describe, am I correct in thinking you detect that scenario on your own and point PropertyGrid to a single object with a Point property that has the (1, NaN) value, instead of using the built-in multiple objects handling in PropertyGrid?  The reason I ask is that if multiple objects are being examined in PropertyGrid and the values are different, it usually shows a blank value.

In the 2017.1 version we rewrote the Editors product to use a much simpler and more performant infrastructure that is also code-compatible the UWP variation.  We tried to keep feature parity where it made sense.  While we do have IsNaNAllowed, IsNegativeInfinityAllowed, IsPositiveInfinityAllowed properties on DoubleEditBox, we didn't think they made sense on the CornerRadiusEditBox, PointEditBox, RectEditBox, SizeEditBox, ThicknessEditBox, and VectorEditBox controls.

So you would like them added to those control types as well?


Actipro Software Support

Posted 7 years ago by Brian Pratt
Avatar

It's a custom property grid I inherited.  We have plans to move to your prop grid, but it will be a long while.

I have a semi-working version (besides one small .. work-around-able issue) using a masked text box.  I lose the 'nudge' functionality, but it is good for now.

If the IsNaNAllowed property was there, I would have not had to change anything (probably spent 4 hours converting to a MaskedTextBox).

I can see situations where you could have a Point edit where one value is correct and the other is NaN (from a database or json or something), which makes the entire Point not show (losing the one good value).  I guess more correctly, how do we show a Point editor that has X as a valid number and Y as invalid data?

Thanks,

Brian

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Brian,

We've been able to add properties to support NaN and infinity component values to PointEditBox and some other edit boxes as well.  Would you like to test a preview build to make sure the updates work for your needs?  Please write our support address and mention this thread and we can send you a link.


Actipro Software Support

The latest build of this product (v24.1.3) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.