Change size and Color of Pushpin

3 posts, 0 answers
  1. Brian
    Brian avatar
    37 posts
    Member since:
    Jul 2010

    Posted 11 May 2011 Link to this post

    How do I chagne the Pushpin size the renders on the xaml and the color of it?

  2. figueiredorj
    figueiredorj avatar
    68 posts
    Member since:
    Mar 2011

    Posted 11 May 2011 Link to this post

    err... I would like to say that I know the answer...
    Instead I am going to enhance the question and ask also how to do a custom pushpin.
    An example would be nice.

  3. Andrey
    Andrey avatar
    1681 posts

    Posted 13 May 2011 Link to this post

    Hi Brian,

    The InformationLayer is the ItemsControl. Similar to any other Silverlight items controls it allows to show your business data using custom representation. You can customize presentation of your business data using item templates. For example:

    public class PointOfInterest : INotifyPropertyChanged 
        public event PropertyChangedEventHandler PropertyChanged; 
        private Location location; 
        private string title; 
        private string description; 
        private HotSpot hotSpot; 
        private Brush background; 
        private Brush borderBrush; 
        private Thickness borderThickness; 
        public Location Location 
                return this.location; 
                this.location = value; 
        public string Title 
                return this.title; 
                this.title = value; 
        public string Description 
                return this.description; 
                this.description = value; 
        public HotSpot HotSpot 
                return this.hotSpot; 
                this.hotSpot = value; 
        public Brush Background 
                return this.background; 
                this.background = value; 
        public Brush BorderBrush 
                return this.borderBrush; 
                this.borderBrush = value; 
        public Thickness BorderThickness 
                return this.borderThickness; 
                this.borderThickness = value; 
        protected void NotifyPropertyChanged(string propertyName) 
            if (this.PropertyChanged != null
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); 

    <UserControl x:Class="ShowPinPointsCS.MainPage"
         d:DesignHeight="300" d:DesignWidth="400"
            <DataTemplate x:Key="CustomTemplate"
                <Border telerik:MapLayer.Location="{Binding Location}"
                        telerik:MapLayer.HotSpot="{Binding HotSpot}"
                        Background="{Binding Background}"
                        BorderBrush="{Binding BorderBrush}"
                        BorderThickness="{Binding BorderThickness}"
                    <Grid Width="50" Height="70" Margin="5"
                            <RowDefinition Height="Auto" /> 
                            <RowDefinition Height="*" /> 
                        <TextBlock Grid.Row="0" Text="{Binding Title}" HorizontalAlignment="Center"  /> 
                        <TextBlock Grid.Row="1" Text="{Binding Description}" HorizontalAlignment="Center" /> 
        <Grid x:Name="LayoutRoot" Background="White"
            <telerik:RadMap x:Name="radMap" 
                Center="42, -100"
                    <telerik:OpenStreetMapProvider /> 
                <telerik:InformationLayer x:Name="informationLayer" 
                      ItemTemplate="{StaticResource CustomTemplate}" /> 

    Andrey Murzov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top