MapPinPoint BorderThickness bigger

2 posts, 0 answers
  1. Luis
    Luis avatar
    4 posts
    Member since:
    Jan 2017

    Posted 10 Apr Link to this post

    Hello i would like to know if there is a way to put the borders of the MapPinPoint bolder than 1, no matter what value y put to BorderThickness , it is always 1. Thanks for advance.

     

    <DataTemplate x:Key="PinPointTemplate">
                <telerik:MapPinPoint telerik:MapLayer.Location="{Binding Path=Location}" 
                                     Background="{Binding Background}"
                                     BorderBrush="{Binding Border}"
                                     BorderThickness="2" 
                                     Width="13" Height="13">
                    <ToolTipService.ToolTip>
                        <ToolTip Content="{Binding Path=Caption}"/>
                    </ToolTipService.ToolTip>
                </telerik:MapPinPoint>

            </DataTemplate>

  2. Lance | Tech Support Engineer, Sr.
    Admin
    Lance | Tech Support Engineer, Sr. avatar
    419 posts

    Posted 12 Apr Link to this post

    Hello Luis,

    You can edit the MapPinPointStyle and increase the border thickness there.

    For your convenience, I've gone ahead and copied out the base style for the MapPinPoint, and set the BorderThickness to 5.

    <Style x:Key="MyMapPinPointStyle" TargetType="maps:MapPinPoint" BasedOn="{StaticResource MapPinPointStyle}">
    <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="maps:MapPinPoint">
            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="5" CornerRadius="3" Padding="2">
              <StackPanel Name="PART_Panel" Orientation="Horizontal">
                <Image Name="PART_Image" Visibility="Collapsed" Stretch="None" Source="{TemplateBinding ImageSource}"/>
                    <TextBlock Name="PART_Text" Margin="2 0 0 0" VerticalAlignment="Center" Text="{TemplateBinding Text}"/>
              </StackPanel>
          </Border>
        </ControlTemplate>
     </Setter.Value>
    </Setter>
    </Style>

    Note: That example above is if you're using implicit styling. If you're not using implicit styling, you can just place this inline with the control and only keep the styles TargetType attribute.

    Regards,
    Lance | Tech Support Engineer, Sr.
    Telerik by Progress
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top