LinearGauge horizontally centered label inside the gauge

Gauge for WPF Forum

Posted 3 years ago by Neil Larson
Version: 20.1.1
Avatar

I want to place a label horizonatally aligned in the center in my linear gauge. Currently, I have a LinearTickLabelCustom tied to the value in the middle of the scale to do this. The problem is that the middle value of the gauge changes over time. What is the best way to do this?

Comments (3)

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

Hi Neil,

The LinearTickLabelCustom.Value property is how custom tick labels are positioned within the tick set.  If your tick set range is changing over time, then you would need to adjust the LinearTickLabelCustom.Value to be in the middle of that range.  Can you make that update any time and in the same place you change the tick set range?


Actipro Software Support

Posted 3 years ago by Neil Larson
Avatar

I dont want this label attached to any tick. I just want to label the whole gauge (label inside the gauge) and have it centered horizontally - ie "GAS" below the E, 1/2, and F tick marks. It's harder to explain than to accomplish I suspect. I could stack the gauge and label, and use a negative margin but that seems awkward. Or do an adorner, but that seems awkward too. The gauges have been so easy to use, I expect that there is an easy way to do this too. :)

Thanks,

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

Hi Neil,

Ahh ok then check out the "Gauge / Advanced Features / Embedding Controls" topic in the documentation that comes with the product.  I think that might be more what you want to do since it's independent of scales.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.