Changed default Pushpin HorizontalAlignment

This commit is contained in:
Clemens 2022-02-09 20:47:01 +01:00
parent 802707f439
commit a9b98c862f
4 changed files with 5 additions and 5 deletions

View file

@ -69,7 +69,7 @@ namespace MapControl
figure.Segments.Add(ArcTo(x2 - r3, y2, r3));
}
if (HorizontalAlignment != HorizontalAlignment.Left && HorizontalAlignment != HorizontalAlignment.Right)
if (HorizontalAlignment == HorizontalAlignment.Center)
{
var c = width / 2d;
figure.Segments.Add(LineTo(c + aw / 2d, y2));
@ -77,7 +77,7 @@ namespace MapControl
figure.Segments.Add(LineTo(c - aw / 2d, y2));
}
if (HorizontalAlignment == HorizontalAlignment.Left)
if (HorizontalAlignment == HorizontalAlignment.Left || HorizontalAlignment == HorizontalAlignment.Stretch)
{
figure.Segments.Add(LineTo(x1 + aw, y2));
figure.Segments.Add(LineTo(x1, y3));

View file

@ -47,7 +47,7 @@
<Style TargetType="map:MapItem" BasedOn="{StaticResource ContentControlStyle}"/>
<Style TargetType="map:Pushpin" BasedOn="{StaticResource ContentControlStyle}">
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Bottom"/>
<Setter Property="Padding" Value="5,7"/>
<Setter Property="Template">

View file

@ -51,7 +51,7 @@
<Style TargetType="map:MapItem" BasedOn="{StaticResource ContentControlStyle}"/>
<Style TargetType="map:Pushpin" BasedOn="{StaticResource ContentControlStyle}">
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Bottom"/>
<Setter Property="Padding" Value="7,5"/>
<Setter Property="Template">

View file

@ -47,7 +47,7 @@
<Style TargetType="map:MapItem" BasedOn="{StaticResource ContentControlStyle}"/>
<Style TargetType="map:Pushpin" BasedOn="{StaticResource ContentControlStyle}">
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Bottom"/>
<Setter Property="Padding" Value="7,5"/>
<Setter Property="Template">