Difficulty with implementation of DoubleEditBox control

Docking/MDI for WPF Forum

Posted 12 years ago by keshav bansal
Version: 11.2.0551
Platform: .NET 4.0
Environment: Windows 7 (64-bit)
Avatar

Hi,

I am currently facing difficulty with implementation of DoubleEditBox control as per our requirement. Our requirement is that we want its StepValue based on its current value.

We have set its range from 0.01 to 90 and want this control should traverse in the following way:-

• When value is between 0.01 and 0.09, it should increment/decrement with .01 on keyboard up/down arrow key, mouse wheel scroll or up/down spin button press.
• When value is between 0.1 and 0.9 then step value should be 0.1,
• When value is between 1 and 9 then step values should be 1,
• When value is between 10 and 90 then its step value should be 10.

Problem:-
1. Is there any straightforward way provided to fulfil this requirement?
2. If we go with custom logic based on current value, then how to capture spin up and down button click event?
3. Need to show custom message to user when it reaches its Minimum or Maximum value. Any built in functionality there?
4. On Using arrow key to remove values, it shows one grey dot once all values removed. I do not want this dot. How to remove this?

I am able to achieve this functionality using my custom logic by exposing mouse wheel and Up/Down arrow key events. My main concern is when I click on Spin up/down button, I am not able to catch that event and decide whether to increment or decrement.

Please provide your inputs on above point ASAP.

Thanks in advance

Regards
Keshav

Comments (1)

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

Hi Keshav,

To have the StepValue property change the way you describe you should bind it to the Value property and create a value converter, with your logic for converting from the value to the appropriate step value, to use.

For displaying a message when the user reaches the min/max value we do not have any built in notifications. However, the TypeSpecificEditBoxBase has an OnExecutedDecrementValue and OnExecutedIncrementValue method that can be overridden. You can override these methods and add in the behavior for when the value hits the min/max values.

For your last question set the PromptIndicatorVisibility property to "Never" to remove the gray dot.


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.