Class
ColorMeasureScale

Class that calculates the range collection for the further use in Map Legend. ShapeFill, Min, Max, Mode and properties corresponding to the mode should be determined here.

Definition

Namespace:Telerik.Windows.Controls.Map

Assembly:Telerik.Windows.Controls.DataVisualization.dll

Syntax:

cs-api-definition
public class ColorMeasureScale : DependencyObject, IMapShapeColorizer

Inheritance: objectColorMeasureScale

Implements: IMapShapeColorizer

Constructors

ColorMeasureScale()

Initializes a new instance of the ColorMeasureScale class.

Declaration

cs-api-definition
public ColorMeasureScale()

Fields

ExtendedPropertyNameProperty

DependencyProperty for ExtendedPropertyName value.

Declaration

cs-api-definition
public static readonly DependencyProperty ExtendedPropertyNameProperty

Field Value

DependencyProperty

HighlightFillCollectionProperty

DependencyProperty for HighlightFillCollection property.

Declaration

cs-api-definition
public static readonly DependencyProperty HighlightFillCollectionProperty

Field Value

DependencyProperty

MaxValueProperty

DependencyProperty for Max value.

Declaration

cs-api-definition
public static readonly DependencyProperty MaxValueProperty

Field Value

DependencyProperty

MinValueProperty

DependencyProperty for Min value.

Declaration

cs-api-definition
public static readonly DependencyProperty MinValueProperty

Field Value

DependencyProperty

ModeProperty

DependencyProperty for Mode value.

Declaration

cs-api-definition
public static readonly DependencyProperty ModeProperty

Field Value

DependencyProperty

RangeDistributionProperty

DependencyProperty for IRangeDistribution value.

Declaration

cs-api-definition
public static readonly DependencyProperty RangeDistributionProperty

Field Value

DependencyProperty

ShapeFillCollectionProperty

DependencyProperty for ShapeFillCollection property.

Declaration

cs-api-definition
public static readonly DependencyProperty ShapeFillCollectionProperty

Field Value

DependencyProperty

TickMarkCountProperty

DependencyProperty for TickMarkCount value.

Declaration

cs-api-definition
public static readonly DependencyProperty TickMarkCountProperty

Field Value

DependencyProperty

TickMarkStepProperty

DependencyProperty for TickMarkStep value.

Declaration

cs-api-definition
public static readonly DependencyProperty TickMarkStepProperty

Field Value

DependencyProperty

Properties

ExtendedPropertyName

Gets or sets the extended property name.

Declaration

cs-api-definition
public string ExtendedPropertyName { get; set; }

Property Value

string

Implements IMapShapeColorizer.ExtendedPropertyName

HighlightFillCollection

Gets the collection of MapShapeFill instances for the shapes highlighting.

Declaration

cs-api-definition
public MapShapeFillCollection HighlightFillCollection { get; }

Property Value

MapShapeFillCollection

IsPrepared

Gets or sets value which indicates whether colorizer have been prepared already.

Declaration

cs-api-definition
public bool IsPrepared { get; set; }

Property Value

bool

Implements IMapShapeColorizer.IsPrepared

MaxValue

Gets or sets the value of Max for the whole MapRangeCollection.

Declaration

cs-api-definition
public double MaxValue { get; set; }

Property Value

double

MinValue

Gets or sets the value of Min for the whole MapRangeCollection.

Declaration

cs-api-definition
public double MinValue { get; set; }

Property Value

double

Mode

Gets or sets ColorScaleMode.

Declaration

cs-api-definition
public ColorScaleMode Mode { get; set; }

Property Value

ColorScaleMode

RangeCollection

Readonly property to get MapRangeCollection.

Declaration

cs-api-definition
public MapRangeCollection RangeCollection { get; }

Property Value

MapRangeCollection

RangeDistribution

Gets or sets ranges distribution. This property specify class which creates range distribution. It makes sense when "Count" mode is used for ColorMeasureScale.

Declaration

cs-api-definition
public IRangeDistribution RangeDistribution { get; set; }

Property Value

IRangeDistribution

ResetOnItemsChanged

Gets or sets value which indicates whether colorizer should be re-prepared when items collection of the information layer is changed.

Declaration

cs-api-definition
public bool ResetOnItemsChanged { get; set; }

Property Value

bool

Implements IMapShapeColorizer.ResetOnItemsChanged

ShapeFillCollection

Gets the collection of MapShapeFill instances for the shapes coloring.

Declaration

cs-api-definition
public MapShapeFillCollection ShapeFillCollection { get; }

Property Value

MapShapeFillCollection

TickMarkCount

Gets or sets the number of tick marks.

Declaration

cs-api-definition
public int TickMarkCount { get; set; }

Property Value

int

TickMarkStep

Gets or sets the number of steps.

Declaration

cs-api-definition
public double TickMarkStep { get; set; }

Property Value

double

UsageMode

Gets colorizer usage mode.

Declaration

cs-api-definition
public ColorizerUsageMode UsageMode { get; }

Property Value

ColorizerUsageMode

Implements IMapShapeColorizer.UsageMode

Methods

Colorize(IEnumerable<object>)

Colorize elements from the list.

Declaration

cs-api-definition
public void Colorize(IEnumerable<object> shapes)

Parameters

shapes

IEnumerable<object>

The shape list.

Implements IMapShapeColorizer.Colorize(IEnumerable<object>)

GetColorByValue(double)

Returns MapShapeFill from MapRangeCollection corresponding the value.

Declaration

cs-api-definition
public MapShapeFill GetColorByValue(double value)

Parameters

value

double

Value.

Returns

MapShapeFill

MapShapeFill instance corresponding value.

OnPrepareCompleted(ShapeColorizerEventArgs)

Raises the PrepareCompleted event.

Declaration

cs-api-definition
protected virtual void OnPrepareCompleted(ShapeColorizerEventArgs args)

Parameters

args

ShapeColorizerEventArgs

The ShapeColorizerEventArgs instance containing the event data.

OnUpdateLegend()

Raises the UpdateLegend event.

Declaration

cs-api-definition
protected virtual void OnUpdateLegend()

Prepare(IEnumerable<object>)

Prepares the instance of the ColorMeasureScale class using the shape list.

Declaration

cs-api-definition
public void Prepare(IEnumerable<object> shapes)

Parameters

shapes

IEnumerable<object>

The shape list.

Implements IMapShapeColorizer.Prepare(IEnumerable<object>)

SetColor(IExtendedData)

Sets color to item by extended data.

Declaration

cs-api-definition
public void SetColor(IExtendedData item)

Parameters

item

IExtendedData

Item of IExtendedData type.

Implements IMapShapeColorizer.SetColor(IExtendedData)

SetColorByExtendedData(IEnumerable<object>, string)

Colors shapes according to specified property from extended data.

Declaration

cs-api-definition
public void SetColorByExtendedData(IEnumerable<object> shapes, string propertyName)

Parameters

shapes

IEnumerable<object>

Shapes collection.

propertyName

string

Name of property from extended data (should have numeric type).

SetColorByExtendedData(IEnumerable<object>, string, bool)

Colors shapes according to specified property from extended data.

Declaration

cs-api-definition
public void SetColorByExtendedData(IEnumerable<object> shapes, string propertyName, bool autoRange)

Parameters

shapes

IEnumerable<object>

Shapes collection.

propertyName

string

Name of property from extended data (should have numeric type).

autoRange

bool

If set to true automatically calculates the scale range.

SetColorCallback(SetColorDelegate)

Set callback that colors the framework element. If the parameter is null, then built-in callback will be used.

Declaration

cs-api-definition
public void SetColorCallback(ColorMeasureScale.SetColorDelegate colorCallback)

Parameters

colorCallback

ColorMeasureScale.SetColorDelegate

Delegate method.

SetScaleRangeByExtendedData(IEnumerable<object>, string)

Specifies Min and Max value according to extended data of shapes.

Declaration

cs-api-definition
public void SetScaleRangeByExtendedData(IEnumerable<object> shapes, string propertyName)

Parameters

shapes

IEnumerable<object>

Shapes.

propertyName

string

Property name.

Events

PrepareCompleted

The Prepare completed event handler.

Declaration

cs-api-definition
public event EventHandler<ShapeColorizerEventArgs> PrepareCompleted

Event Value

EventHandler<ShapeColorizerEventArgs>

Implements IMapShapeColorizer.PrepareCompleted

UpdateLegend

The update legend event handler. Occurs when the instance is changed and the map legend should be updated.

Declaration

cs-api-definition
public event EventHandler UpdateLegend

Event Value

EventHandler

Implements IMapShapeColorizer.UpdateLegend