Circular Gauge as a Compass

Gauge for WPF Forum

Posted 12 years ago by Thomas Long
Version: 11.2.0554
Avatar

I would like to create a compass using a circular gauge, similar to the compass in the 'aviation' demo, with the needle pointed North and the scale rotating to indicate heading.

Any suggestions?

Comments (2)

Posted 12 years ago by Thomas Long
Avatar

Figured it out.  Bound the Scales's StartAngle to heading and viola, it worked.

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

Hi Thomas,

Yes that is correct.  If you would want a needle that is fixed, then have the scale behind it rotate to indicate the direction, the Circular Gauge Scales QuickStart is a good sample. If you use the slider to adjust the StartAngle of the Celsius scale, you can see it rotates the yellow scale. Since the pointer is defined on the Fahrenheit scale, it does not move.

So effectively you would need two scales, where the first just defines your pointer and everything else is hidden. The second scale would have the ticks for N/S/E/W and you would rotate it using StartAngle.  Basically what it sounds like you did.


Actipro Software Support

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.