MapPolygon Styling

2 posts, 0 answers
  1. Nicholas
    Nicholas avatar
    1 posts
    Member since:
    Feb 2012

    Posted 09 Apr 2012 Link to this post


    I am having an issue with styling MapPolygons. I am able to style some settings such as the tooltip but am unsuccessful in styling other aspects like the border.

    What I am trying to do is apply an Effect to a MapPolygon when the mouse is over it. Below is a Xaml snippet of my style, which doesn't work with or without the trigger. 

    <Style x:Key="zoneStyle" TargetType="telerik:MapPolygon">
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Effect">
                        <DropShadowEffect ShadowDepth="3" BlurRadius="3" Color="Purple"/>

    Applying a BorderBrush in the style doesn't work either. Is there something I am missing?

    Thanks in advance.

  2. Andrey
    Andrey avatar
    1681 posts

    Posted 12 Apr 2012 Link to this post

    Hello Nicholas,

    The map shape objects use regular Silverlight shapes for visualization. The map shapes provide the same set of the painting properties as the regular Silverlight shapes provide (Fill, Stroke, StrokeThikness and so on). These properties are combined in the MapShapeFill object. So you always can refer to the MSDN as well as to the Telerik documentation for detailed information about painting properties:

    For example, the MapPolygon shape can use Fill, Stroke and StrokeThikness properties:

    <Style x:Key="zoneStyle" TargetType="telerik:MapPolygon">
        <Setter Property="Fill" Value="Azure" />
        <Setter Property="Stroke" Value="Red" />
        <Setter Property="StrokeThickness" Value="2" />

    Unfortunately triggers and effects aren't supported for map shape objects.

    Andrey Murzov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top