Instruments are Panels that include:
Optionally there are other TextBlocks or Shapes that show additional information. Indicators can be Shapes or TextBlocks or more complicated Panels. For more about scales, please read Graduated Panels. For simplicity, all of these instruments only show one value. But you could define instruments that show multiple values on the same scale, or that have multiple scales.
When an instrument is also a control, the user can modify the instrument's value. When the instrument is editable, there may be a handle that the user can drag. This might be the same as the indicator or might be a different object.
This sample defines five different types of instruments.
The value to be shown by the instrument is assumed to be the data.value
property.
The value is shown both textually in a TextBlock and graphically using an indicator on the scale.
If the value of data.editable
is true,
Of course you can change the details of anything you want to use. You might want to add more TextBlocks to show more information. A few properties already have data Bindings, such as:
data.text
, for the name of the instrumentdata.min
, to control the range of the scaledata.max
, to control the range of the scaledata.color
, to control some colors used by the instrument