Requesting Pointer value wrapping with full circular gauge for Angles and ShortestDistance

Gauge for WPF Forum

The latest build of this product (v2019.1 build 0686) was released 1 month ago, which was before this thread was created.
Posted 1 month ago by Tom P.
Version: 19.1.0684
Avatar

Let's say you have a full Circular Gauge that goes from -180 to 180 degrees. If I use SnappingInterval of say 44 degrees, I don't expect to ever snap to -180 or 180. However, the Pointers seem to do just that; they snap to the Minimum and Maximum. I would expect to wrap to the other side of the Gauge when using ShortestDistance.

Is there a way around this? I could try to do the math myself with ValueChanged event handler, but I would rather not do so.

Comments (3)

Posted 1 month ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Tom,

Just to make sure we are reproducing your exact scenario, can you post some sample XAML showing this that we can debug with?  Thanks!


Actipro Software Support

Posted 1 month ago by Tom P.
Avatar

I actually solved this issue. I utilized a separate TickSet for Dragging. I changed the Minimum/Maximum so that they were clamped to my Increment values. Perfect. In my custom control, I did have to dynamically calculate the TickSet.Sweep and StartAngle, but that was simple math.  I'm happy to send you the example code if interested. You might want to add this as a feature should others encounter this Use Case.

Thanks for your support!

Posted 1 month ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Tom,

Great, I'm glad you got it working.  If it's a quick post, please feel free to show what you did.


Actipro Software Support

Add Comment

Please log in to a validated account to post comments.