ComponentOne Gauges for WinForms
Working with Gauges for WinForms / Custom Pointers and Mark Shapes
In This Topic
    Custom Pointers and Mark Shapes
    In This Topic

    Pointers and tick marks use the special class (C1GaugeCustomShape) that draws as a geometric figure with a number of layout options. Also, there are a few predefined shapes. The following are the predefined shapes available via the C1GaugePointer.Shape property:


    C1GaugePointer shapes

    The properties of a custom shape are specified in C1GaugePointer.CustomShape. The next images illustrate all the available options. All angles and radiuses can be either positive or negative. Here the Length property belongs to C1GaugePointer, not to C1GaugeCustomShape. There is also the Width property in C1GaugePointer that sets the maximum of C1GaugeCustomShape.StartWidth and C1GaugeCustomShape.EndWidth. The C1GaugePointer.FlipShape property allows flipping the pointer. So the start becomes end and vice versa.


    C1GaugePointer shape
    C1GaugePointer shape

    The C1GaugeSingleMark and C1GaugeMarks decorators have the Shape and CustomShape properties as well. 'Rectangle', 'Round', and 'Triangle' are the only available predefined shapes for the tick marks.

    It may occur that several gauge elements, for example a C1GaugeMarks and a C1GaugePointer, use the same custom shape (C1GaugeCustomShape). If so, you can create a common shape in the CommonShapes collection of the owner C1Gauge or C1GaugeBase. Then you can select the name of the common shape from the drop-down list of the CustomShape property or you can assign this name to the C1GaugeCustomShape.CommonShapeName property from code.

    See Also