Question

How to change width of digital gauge segments

Posted 4 years ago by Avatar David

Hi,

We need the segments in a 7/14-segment WPF digital gauge to be slightly wider than they are by default. Is there any property or method (or workaround) to change the segment width without changing the digit size? Could it be done with a control template? (Please bear in mind that I'm new to WPF, so I might be overlooking some obvious option...)

Thanks in advance,

David

[Modified 4 years ago]


Comments (4)

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

Hi David,

Check out the Digital Gauge Characters QuickStart in the Sample Browser.  That shows you the various properties you can modify, such as the character height and then the character width ratio.  With those, you can adjust the sizing however you need.


Actipro Software Support
Posted 4 years ago by David

Hi,

Thanks for your kind reply. I was aware of those properties and the way they affect the characters's aspect ratio, but unless I'm missing something, they do not seem to allow us do what we need, namely, to vary the segments width without changing the character's aspect ratio.

To be more specific, I need the aspect ratio to be exactly 0.5 but with wider (thicker) segments. If I change the character's height/width, the segment's widths scale as well, and they end up being as thin as they were (in proportion to character size) before the change. It seems that the segment width is fixed and equal to a percentage of the character's overall width or height (or a function of the latter two). So my question is about the possibility of changing that percentage. Do you think that can be done the control's accessible properties?

Best Regards,

David

[Modified 4 years ago]

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

Hi David,

Thank you for the explanation.  I looked at the code and right now for the 7/14 normal segment digits, the thickness = height / 21.  There aren't any public properties that allow you to alter that ratio at this time.  We will add a new CharacterSegmentThickness property for you in the next version so that it will be configurable.  It will default to doing our current logic, but you'll be able to set a specific thickness with the new property.


Actipro Software Support
Posted 4 years ago by David

Hi,

Great! Thank you for your diligent response and your willingness to udpate your code in terms of our request. I look forward to the new version, which I'm sure will make your gauges more flexible and even better looking.
Best Regards,
David

Information The latest build of this product (2018.1 build 0673) was released 1 month ago, which was after the last post in this thread.

Add a Comment

Please log in to a validated account to post comments.