Class MapItemSetting
Represents the MapItemSetting in the map.
Inheritance
Namespace: Syncfusion.UI.Xaml.Maps
Assembly: Syncfusion.SfMaps.WPF.dll
Syntax
public class MapItemSetting : DependencyObject
Remarks
MapItemSetting class contains the properties to customize the map items, when default template is applied on the MapItem.
Examples
Refer the following code to know how MapItemSetting is defined.
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();
MapItemSetting mapItemSetting = new MapItemSetting();
mapItemSetting.MapItemFontFamily = new Windows.UI.Xaml.Media.FontFamily("Times New Roman");
mapItemSetting.MapItemFontSize = 10d;
mapItemSetting.MapItemForeground = new SolidColorBrush(Colors.OldLace);
ShapeFileLayer layer = new ShapeFileLayer();
layer.MapItemSetting = mapItemSetting;
layer.Uri = "MapApp.world.shp";
syncMap.Layers.Add(layer);
}
}
}
Constructors
MapItemSetting()
Initializes a new instance of the MapItemSetting class.
Declaration
public MapItemSetting()
Fields
IntersectionActionProperty
Using a DependencyProperty as the backing store for IntersectionAction.
Declaration
public static readonly DependencyProperty IntersectionActionProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
MapItemFontFamilyProperty
// Using a DependencyProperty as the backing store for LabelFontFamily. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty MapItemFontFamilyProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
MapItemFontSizeProperty
// Using a DependencyProperty as the backing store for LabelFontSize. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty MapItemFontSizeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
MapItemFontStyleProperty
// Using a DependencyProperty as the backing store for LabelFontStyle. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty MapItemFontStyleProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
MapItemForegroundProperty
// Using a DependencyProperty as the backing store for LabelForeground. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty MapItemForegroundProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SmartLabelModeProperty
Using a DependencyProperty as the backing store for SmartLabelMode.
Declaration
public static readonly DependencyProperty SmartLabelModeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Properties
IntersectionAction
Gets or sets IntersectionAction
Declaration
public IntersectAction IntersectionAction { get; set; }
Property Value
Type |
---|
IntersectAction |
MapItemFontFamily
Gets or sets the font family for the map item Labels on the SfMap.
Declaration
public FontFamily MapItemFontFamily { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.FontFamily | Type :System.Windows.Media.FontFamily |
Remarks
Use MapItemForeground property to set the font family for the map item.
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();
SfMap syncMap = new SfMap();
MapItemSetting mapItemSetting = new MapItemSetting();
mapItemSetting.MapItemFontFamily = new Windows.UI.Xaml.Media.FontFamily("Times New Roman");
ShapeFileLayer layer = new ShapeFileLayer();
layer.MapItemSetting = mapItemSetting;
layer.Uri = "MapApp.world.shp";
syncMap.Layers.Add(layer);
}
}
}
MapItemFontSize
Gets or sets the font size for the map item Labels on the SfMap.
Declaration
public double MapItemFontSize { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Type :System.Double |
Remarks
Use MapItemForeground property to set the font size for the map item.
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();
SfMap syncMap = new SfMap();
MapItemSetting mapItemSetting = new MapItemSetting();
mapItemSetting.MapItemFontSize = 20d;
ShapeFileLayer layer = new ShapeFileLayer();
layer.MapItemSetting = mapItemSetting;
layer.Uri = "MapApp.world.shp";
syncMap.Layers.Add(layer);
}
}
}
MapItemFontStyle
Gets or sets the font style for the map item Labels on the SfMap.
Declaration
public FontStyle MapItemFontStyle { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.FontStyle | Type :System.Windows.FontStyle |
Remarks
Use MapItemForeground property to set the font style color for the map item.
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();
SfMap syncMap = new SfMap();
MapItemSetting mapItemSetting = new MapItemSetting();
mapItemSetting.MapItemFontStyle = FontStyle.Normal;
ShapeFileLayer layer = new ShapeFileLayer();
layer.MapItemSetting = mapItemSetting;
layer.Uri = "MapApp.world.shp";
syncMap.Layers.Add(layer);
}
}
}
MapItemForeground
Gets or sets the Foreground Color for the Labels on the SfMap.
Declaration
public Brush MapItemForeground { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Brush | Type :System.Windows.Media.Brush |
Remarks
Use MapItemForeground property to set the foreground color for the map item.
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();
SfMap syncMap = new SfMap();
MapItemSetting mapItemSetting = new MapItemSetting();
mapItemSetting.MapItemForeground = new SolidColorBrush(Colors.OldLace);
ShapeFileLayer layer = new ShapeFileLayer();
layer.MapItemSetting = mapItemSetting;
layer.Uri = "MapApp.world.shp";
syncMap.Layers.Add(layer);
}
}
}
SmartLabelMode
Gets or sets the SmartLabelMode
Declaration
public IntersectAction SmartLabelMode { get; set; }
Property Value
Type |
---|
IntersectAction |