Class RangeColorMapping
Represents the RangeColorMapping class in the map.Inherited from the Windows.UI.Xaml.DependencyObject
Inherited Members
Namespace: Syncfusion.UI.Xaml.Maps
Assembly: Syncfusion.SfMaps.UWP.dll
Syntax
public class RangeColorMapping : ColorMapping
Remarks
RangeColorMapping class contains the members to provide the TreeMap like support for Bubbles and MapShapes.
Examples
Refer the following code to know how to define the range color mapping
using Syncfusion.UI.Xaml.Maps;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
namespace MapApp
{
public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
SfMap syncMap = new SfMap();
ViewModel viewModel = new ViewModel();
ShapeFileLayer layer = new ShapeFileLayer();
layer.Uri = "MapApp.world1.shp";
BubbleMarkerSetting bubbleSetting = new BubbleMarkerSetting();
bubbleSetting.AutoFillColor = false;
bubbleSetting.ColorMappings.Add(new RangeColorMapping { Range=0, Color=Colors.White });
bubbleSetting.ColorMappings.Add(new RangeColorMapping { Range = 50, Color = Colors.Thistle });
bubbleSetting.ColorMappings.Add(new RangeColorMapping { Range = 100, Color = Colors.Violet });
bubbleSetting.ValuePath = "AverageHighTemperature";
bubbleSetting.Stroke = new SolidColorBrush(Colors.Black);
bubbleSetting.StrokeThickness = 5;
bubbleSetting.MaxSize = 500;
bubbleSetting.MinSize = 100;
layer.BubbleMarkerSetting = bubbleSetting;
syncMap.Layers.Add(layer);
}
}
}
Constructors
RangeColorMapping()
Initializes a new instance of the RangeColorMapping class.
Declaration
public RangeColorMapping()
Fields
FromProperty
// Using a DependencyProperty as the backing store for From. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty FromProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
GradientColorsProperty
// Using a DependencyProperty as the backing store for GradientColors. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty GradientColorsProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
RangeProperty
// Using a DependencyProperty as the backing store for Range. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty RangeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ToProperty
// Using a DependencyProperty as the backing store for To. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ToProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Properties
From
Gets or sets the start range for the RangeColorMapping.
Declaration
public double From { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Type:System.Double |
Remarks
Use From property to set the start range in the RangeColorMapping when providing Tree map like support for bubble or map shape.
Examples
using Syncfusion.UI.Xaml.Maps;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
namespace MapApp
{
public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
RangeColorMapping mapping = new RangeColorMapping();
mapping.From = 50;
mapping.Color = Colors.Orange;
}
}
}
GradientColors
Gets or sets the GradientColors range for the RangeColorMapping.
Declaration
public List<Color> GradientColors { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<Windows.UI.Color> | Type:System.Double |
Remarks
Use GradientColors property to set the GradientColors range in the RangeColorMapping when providing Tree map like support for bubble or map shape.
Examples
using Syncfusion.UI.Xaml.Maps;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
namespace MapApp
{
public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
RangeColorMapping mapping = new RangeColorMapping();
mapping.GradientColors = { Colors.Red, Colors.Blue};
mapping.Color = Colors.Orange;
}
}
}
Range
Gets or sets the range for the RangeColorMapping.
Declaration
public double Range { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Type:System.Double |
Remarks
Use Range property to set the range in the RangeColorMapping when providing Tree map like support for bubble or map shape.
Examples
using Syncfusion.UI.Xaml.Maps;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
namespace MapApp
{
public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
RangeColorMapping mapping = new RangeColorMapping();
mapping.Range = 50;
mapping.Color = Colors.Orange;
}
}
}
To
Gets or sets the end range for the RangeColorMapping.
Declaration
public double To { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Type:System.Double |
Remarks
Use To property to set the end range in the RangeColorMapping when providing Tree map like support for bubble or map shape.
Examples
using Syncfusion.UI.Xaml.Maps;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
namespace MapApp
{
public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
RangeColorMapping mapping = new RangeColorMapping();
mapping.To = 50;
mapping.Color = Colors.Orange;
}
}
}
Methods
Validate(Object)
Validates the object values
Declaration
public override bool Validate(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value |
Returns
Type |
---|
System.Boolean |