Class MapShape
Base class which represents any shape specified in the geographical coordinates.
Inheritance
Namespace: Telerik.Windows.Controls.Map
Assembly: Telerik.Windows.Controls.DataVisualization.dll
Syntax
public abstract class MapShape : Control, IExtendedData, IColorable, IGeoSizeProvider
Constructors
MapShape()
Initializes a new instance of the MapShape class.
Declaration
protected MapShape()
Fields
CaptionLocationProperty
Identifies the CaptionLocation dependency property.
Declaration
public static readonly DependencyProperty CaptionLocationProperty
Field Value
System.Windows.DependencyProperty
|
CaptionTemplateProperty
Identifies the CaptionTemplate dependency property.
Declaration
public static readonly DependencyProperty CaptionTemplateProperty
Field Value
System.Windows.DependencyProperty
|
FillProperty
Identifies the Fill dependency property.
Declaration
public static readonly DependencyProperty FillProperty
Field Value
System.Windows.DependencyProperty
|
HighlightFillProperty
Identifies the HighlightFill dependency property.
Declaration
public static readonly DependencyProperty HighlightFillProperty
Field Value
System.Windows.DependencyProperty
|
ShapeFillProperty
Identifies the ShapeFillProperty dependency property.
Declaration
public static readonly DependencyProperty ShapeFillProperty
Field Value
System.Windows.DependencyProperty
|
StrokeDashArrayProperty
Identifies the StrokeDashArray dependency property.
Declaration
public static readonly DependencyProperty StrokeDashArrayProperty
Field Value
System.Windows.DependencyProperty
|
StrokeDashCapProperty
Identifies the StrokeDashCap dependency property.
Declaration
public static readonly DependencyProperty StrokeDashCapProperty
Field Value
System.Windows.DependencyProperty
|
StrokeDashOffsetProperty
Identifies the StrokeDashOffset dependency property.
Declaration
public static readonly DependencyProperty StrokeDashOffsetProperty
Field Value
System.Windows.DependencyProperty
|
StrokeEndLineCapProperty
Identifies the StrokeEndLineCap dependency property.
Declaration
public static readonly DependencyProperty StrokeEndLineCapProperty
Field Value
System.Windows.DependencyProperty
|
StrokeLineJoinProperty
Identifies the StrokeLineJoin dependency property.
Declaration
public static readonly DependencyProperty StrokeLineJoinProperty
Field Value
System.Windows.DependencyProperty
|
StrokeMiterLimitProperty
Identifies the StrokeMiterLimit dependency property.
Declaration
public static readonly DependencyProperty StrokeMiterLimitProperty
Field Value
System.Windows.DependencyProperty
|
StrokeProperty
Identifies the Stroke dependency property.
Declaration
public static readonly DependencyProperty StrokeProperty
Field Value
System.Windows.DependencyProperty
|
StrokeStartLineCapProperty
Identifies the StrokeStartLineCap dependency property.
Declaration
public static readonly DependencyProperty StrokeStartLineCapProperty
Field Value
System.Windows.DependencyProperty
|
StrokeThicknessProperty
Identifies the StrokeThickness dependency property.
Declaration
public static readonly DependencyProperty StrokeThicknessProperty
Field Value
System.Windows.DependencyProperty
|
VisibilityListenerProperty
Listener for the Visibility property.
Declaration
public static readonly DependencyProperty VisibilityListenerProperty
Field Value
System.Windows.DependencyProperty
|
Properties
CaptionLocation
Gets or sets the location of the map shape caption.
Declaration
public Location CaptionLocation { get; set; }
Property Value
Location
|
CaptionTemplate
Gets or sets caption content template. You can bind elements in the caption template to extended properties using ExtendedDataConverter and Data property of the ExtendedData object.
Declaration
public DataTemplate CaptionTemplate { get; set; }
Property Value
System.Windows.DataTemplate
|
Examples
This example demonstrates how the caption template can be set.
<telerik:MapPolygon Points="56,-100 56,-108 48,-108 48,-100"
Fill="Green"
Stroke="Red"
StrokeThickness="4"
CaptionLocation="52,-104">
<telerik:MapPolygon.CaptionTemplate>
<DataTemplate>
<Grid Background="Yellow"
telerik:MapLayer.HotSpot="0.5,0.5">
<TextBlock Text="{Binding Path=Data, Converter={StaticResource ExtendedDataConverter}, ConverterParameter='CNTRY_NAME'}" />
</Grid>
</DataTemplate>
</telerik:MapPolygon.CaptionTemplate>
</telerik:MapPolygon>
.
ExtendedData
Gets or sets shape's extended data.
Declaration
public ExtendedData ExtendedData { get; set; }
Property Value
ExtendedData
|
Implements
Fill
Gets or sets the Brush that specifies how the shape's interior is painted.
Declaration
public Brush Fill { get; set; }
Property Value
System.Windows.Media.Brush
|
GeoBounds
Gets geographical bounds of the shape.
Declaration
public LocationRect GeoBounds { get; }
Property Value
LocationRect
|
Implements
GeographicalBounds
Gets geographical bounds of the shape.
Declaration
public LocationRect GeographicalBounds { get; }
Property Value
LocationRect
|
GeoSize
Gets or sets geographical size of the shape.
Declaration
public Size GeoSize { get; }
Property Value
System.Windows.Size
|
Implements
HighlightFill
Gets or sets the highlight shape fill properties.
Declaration
public MapShapeFill HighlightFill { get; set; }
Property Value
MapShapeFill
|
Implements
NeedUpdateLocation
Gets or sets value which indicates whether we should update location of this shape.
Declaration
protected bool NeedUpdateLocation { get; set; }
Property Value
System.Boolean
|
ScreenBounds
Gets bounding rectangle given in pixels.
Declaration
public abstract Rect ScreenBounds { get; }
Property Value
System.Windows.Rect
|
ShapeFill
Gets or sets the shape fill properties.
Declaration
public MapShapeFill ShapeFill { get; set; }
Property Value
MapShapeFill
|
Implements
Stroke
Gets or sets the Brush that specifies how the Shape outline is painted.
Declaration
public Brush Stroke { get; set; }
Property Value
System.Windows.Media.Brush
|
StrokeDashArray
Gets or sets a collection of Double values that indicate the pattern of dashes and gaps that is used to outline shapes.
Declaration
public DoubleCollection StrokeDashArray { get; set; }
Property Value
System.Windows.Media.DoubleCollection
|
StrokeDashCap
Gets or sets a PenLineCap enumeration value that specifies how the ends of a dash are drawn.
Declaration
public PenLineCap StrokeDashCap { get; set; }
Property Value
System.Windows.Media.PenLineCap
|
StrokeDashOffset
Gets or sets a Double that specifies the distance within the dash pattern where a dash begins.
Declaration
public double StrokeDashOffset { get; set; }
Property Value
System.Double
|
StrokeEndLineCap
Gets or sets a PenLineCap enumeration value that describes the Shape at the end of a line.
Declaration
public PenLineCap StrokeEndLineCap { get; set; }
Property Value
System.Windows.Media.PenLineCap
|
StrokeLineJoin
Gets or sets a PenLineJoin enumeration value that specifies the type of join that is used at the vertices of a Shape.
Declaration
public PenLineJoin StrokeLineJoin { get; set; }
Property Value
System.Windows.Media.PenLineJoin
|
StrokeMiterLimit
Gets or sets a limit on the ratio of the miter length to half the StrokeThickness of a Shape element.
Declaration
public double StrokeMiterLimit { get; set; }
Property Value
System.Double
|
StrokeStartLineCap
Gets or sets a PenLineCap enumeration value that describes the Shape at the start of a Stroke.
Declaration
public PenLineCap StrokeStartLineCap { get; set; }
Property Value
System.Windows.Media.PenLineCap
|
StrokeThickness
Gets or sets the width of the Shape outline.
Declaration
public double StrokeThickness { get; set; }
Property Value
System.Double
|
Methods
CaptureMouse()
Sets mouse capture to a System.Windows.UIElement.
Declaration
public bool CaptureMouse()
Returns
System.Boolean
Returns true if the object has mouse capture; otherwise, returns false. |
MoveTo(Location)
Change location of the shape.
Declaration
public abstract void MoveTo(Location location)
Parameters
Location
location
New location. |
OnMapCanvasChanged(MapCanvas, MapCanvas)
Is called when map canvas is changed.
Declaration
protected virtual void OnMapCanvasChanged(MapCanvas oldCanvas, MapCanvas newCanvas)
Parameters
MapCanvas
oldCanvas
Old map canvas. |
MapCanvas
newCanvas
New map canvas. |
OnMapControlChanged(RadMap, RadMap)
Is called when map control is changed.
Declaration
protected virtual void OnMapControlChanged(RadMap oldMap, RadMap newMap)
Parameters
RadMap
oldMap
Old map control. |
RadMap
newMap
New map control. |
PrepareShape()
Calculates pixel size and prepare graphical shape representation.
Declaration
protected abstract Size PrepareShape()
Returns
System.Windows.Size
|
PreprocessTransformation()
Preprocess render transform.
Declaration
protected void PreprocessTransformation()
RaiseEvent(RadRoutedEventArgs)
Raises a specific routed event. The RoutedEvent to be raised is identified within the RadRoutedEventArgs instance that is provided (as the RoutedEvent property of that event data).
Declaration
public void RaiseEvent(RadRoutedEventArgs args)
Parameters
RadRoutedEventArgs
args
A RadRoutedEventArgs that contains the event data and also identifies the event to raise. |
ReleaseMouseCapture()
Removes mouse capture from a System.Windows.UIElement. After this call, typically no object holds mouse capture.
Declaration
public void ReleaseMouseCapture()
SetShapeFillStroke()
Sets shape's filling and stroke parameters.
Declaration
protected void SetShapeFillStroke()
SetupEvents()
Creates mouse event handlers.
Declaration
protected void SetupEvents()
UseHighlightFill()
Use highlight fill and stroke settings.
Declaration
public void UseHighlightFill()
UseRegularFill()
Use regular fill and stroke settings.
Declaration
public void UseRegularFill()
Events
MouseEnter
Occurs when any mouse button is pressed while the pointer is over this element.
Declaration
public event MouseEventHandler MouseEnter
Event Type
System.Windows.Input.MouseEventHandler
|
MouseLeave
Occurs when the mouse pointer leaves the bounds of this element.
Declaration
public event MouseEventHandler MouseLeave
Event Type
System.Windows.Input.MouseEventHandler
|
MouseLeftButtonDown
Occurs when the left mouse button is pressed while the mouse pointer is over this element.
Declaration
public event MouseButtonEventHandler MouseLeftButtonDown
Event Type
System.Windows.Input.MouseButtonEventHandler
|
MouseLeftButtonUp
Occurs when the left mouse button is released while the mouse pointer is over this element.
Declaration
public event MouseButtonEventHandler MouseLeftButtonUp
Event Type
System.Windows.Input.MouseButtonEventHandler
|
MouseMove
Occurs when the mouse pointer moves while over this element.
Declaration
public event MouseEventHandler MouseMove
Event Type
System.Windows.Input.MouseEventHandler
|
MouseRightButtonDown
Occurs when the right mouse button is pressed while the mouse pointer is over this element.
Declaration
public event MouseButtonEventHandler MouseRightButtonDown
Event Type
System.Windows.Input.MouseButtonEventHandler
|
MouseRightButtonUp
Occurs when the right mouse button is released while the mouse pointer is over this element.
Declaration
public event MouseButtonEventHandler MouseRightButtonUp
Event Type
System.Windows.Input.MouseButtonEventHandler
|
MouseWheel
Occurs when the user rotates the mouse wheel while the mouse pointer is over this element.
Declaration
public event MouseWheelEventHandler MouseWheel
Event Type
System.Windows.Input.MouseWheelEventHandler
|