Gauges for WinForms | ComponentOne
Working with Gauges for WinForms / Gauge Decorators / Decorator ValueColors
In This Topic
    Decorator ValueColors
    In This Topic

    All decorators have the C1GaugeDecorator.ValueColors collection property. It allows mapping colors to value thresholds to display, for example, a multi-colored range or a set of labels. A few gradient blending types are supported via the ValueColorFalloff property.

    The C1GaugeDecorator.ValueColors collection contains objects of the C1GaugeValueColor type. Each of these objects associates a value (specified by the C1GaugeValueColor.Value property) with some color (specified by the Color and Opacity properties). Instead of the fixed value you may provide the index of a pointer that gives the value associated with this object. Thus, the C1GaugeValueColor.PointerIndex property allows binding the color to a pointer.

    For filled decorators, such as ranges or tick marks, the ValueColors property is used if the BrushType property equals to 'SolidColor'.

    If several decorators use the same color mapping you can create the common mapping item (CommonColorMap) in the C1GaugeBase.ColorMaps collection. The common item includes the CommonColorMap.ValueColors and CommonColorMap.ValueColorFalloff properties. The CommonItem.Name property defines a name that can be assigned to the C1GaugeDecorator.ColorMapName property. Then, the common mapping colors will be used instead of C1GaugeDecorator.ValueColors.

    See Also