How to scale a gauge in the Uniform mode


Scale a gauge in the Uniform mode

When designing a gauge using the Instrument Designer you may need to set uniform scaling of a gauge. Unfortunately, this cannot be done directly through some property of an instrument, but there is a solution of the task. And in this tutorial we will consider how to implement uniform scaling using the Instrument Designer.


First, we create a new gauge.

Now, we place the Joint element into the gauge and set the Dock property to Center:

Now, we can place other required elements following a simple rule: use Expressions to bind the required properties of the elements to the properties of the Joint element we’ve added before. Let’s see this on a simple sample:

  1. Add one more Joint element and bind its center and radius with the corresponding properties of the Joint1 element through Expressions:


      2.   Add a visual element - Circle and also bind it to Joint1:

   3.  Place another visual element - Pie and bind its properties to the Joint2 which was added during the step 1. Since Joint2 is bound to Joint1, it will be dependently bound to Joint1.


And the gauge we get as a result of these simple actions can be scaled in the uniform mode:




Here you can download a sample application described in this tutorial:
http://perpetuumsoft.com/Support/samples/UniformScalingSample.zip




Add Feedback