Snapping issue with interactive circular gauge

Gauge for WPF Forum

Posted 14 years ago by Julien Poulin
Version: 9.2.0515
Avatar
Hello,

I'm having a little snapping issue with an interactive circular gauge. To describe this problem, I'm going to use the Sample Browse provided with the controls:

1. Go to 'Gauge' then select the 'Circular Gauge Interactive'
2. Check 'Is Snapping Enabled' and set the snapping interval to 5.
3. On the gauge, click near the 5 to set the value to 5.

Now I want to set the value to 0 by clicking near the 0, but outside the scale (where -0.5 would be) --> the value is set to 10, which is not the result I want, I would prefer if it was set to 0.

The behavior I'm observing with my gauge is a little different though. Here is the Xaml I'm using:

<Gauge:CircularScale StartAngle="225" SweepAngle="135" IsBarVisible="False">
  <Gauge:CircularTickSet Minimum="0" Maximum="3" MajorInterval="1" MinorInterval="1">
    <Gauge:CircularTickSet.Ticks>
      <Gauge:CircularTickLabelCustom Value="0" Text="L" FontSize="18" ScaleOffset="-15" />
        <Gauge:CircularTickLabelCustom Value="1" Text="N" FontSize="18" ScaleOffset="-15" />
        <Gauge:CircularTickLabelCustom Value="2" Text="Å" FontSize="18" ScaleOffset="-15" />
        <Gauge:CircularTickLabelCustom Value="3" Text="S" FontSize="18" ScaleOffset="-15" />
      </Gauge:CircularTickSet.Ticks>
      <Gauge:CircularTickSet.Pointers>
        <Wpf:CircularPointerNeedleEnhanced Value="{Binding OutsideServiceKeySwitch, Mode=TwoWay, FallbackValue=1}"
            ImageSource="/VirtualTrain;Component/Images/Selector.png" NeedleType="CustomImage" PointerExtent="10"
            CanDrag="True" IsSnappingEnabled="True" HasDropShadow="False" IsDraggingAnimated="True" SnappingInterval="1" />
      </Gauge:CircularTickSet.Pointers>
    </Gauge:CircularTickSet>
  </Gauge:CircularScale>
</Gauge:CircularGauge>
On this gauge (having the default value set to 1), when I click near the 'S' (value 3), the value is set to 0. I would prefer if it was set to 3.

Is there a way to achieve this? Is there a setting I'm missing?

Comments (2)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Julien,

This appears to be a bug, which we've corrected for the 2010.1 release. It should have been taking the closest value between the min and max values when clicking in the "gap" area, but it wasn't.


Actipro Software Support

Posted 14 years ago by Julien Poulin
Avatar
That is good news, thank you!
The latest build of this product (v24.1.1) 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.