This is a migrated thread and some comments may be shown as answers.

MapPinPoint BorderThickness bigger

1 Answer 71 Views
Map
This is a migrated thread and some comments may be shown as answers.
Luis
Top achievements
Rank 1
Luis asked on 10 Apr 2017, 01:48 PM

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>

1 Answer, 1 is accepted

Sort by
0
Lance | Manager Technical Support
Telerik team
answered on 12 Apr 2017, 02:37 PM
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.
Tags
Map
Asked by
Luis
Top achievements
Rank 1
Answers by
Lance | Manager Technical Support
Telerik team
Share this question
or