mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Updated Pushpin Style
This commit is contained in:
parent
a9b98c862f
commit
e026205a7f
|
|
@ -49,17 +49,19 @@
|
||||||
<Style TargetType="map:Pushpin" BasedOn="{StaticResource ContentControlStyle}">
|
<Style TargetType="map:Pushpin" BasedOn="{StaticResource ContentControlStyle}">
|
||||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
<Setter Property="VerticalAlignment" Value="Bottom"/>
|
<Setter Property="VerticalAlignment" Value="Bottom"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="CornerRadius" Value="5"/>
|
||||||
<Setter Property="Padding" Value="5,7"/>
|
<Setter Property="Padding" Value="5,7"/>
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="map:Pushpin">
|
<ControlTemplate TargetType="map:Pushpin">
|
||||||
<map:PushpinBorder
|
<map:PushpinBorder
|
||||||
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
||||||
Padding="{TemplateBinding Padding}"
|
|
||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}"
|
||||||
BorderBrush="{TemplateBinding BorderBrush}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
BorderWidth="1"
|
BorderWidth="{Binding BorderThickness.Left, RelativeSource={RelativeSource TemplatedParent}}"
|
||||||
CornerRadius="5">
|
CornerRadius="{TemplateBinding CornerRadius}"
|
||||||
|
Padding="{TemplateBinding Padding}">
|
||||||
<ContentPresenter
|
<ContentPresenter
|
||||||
Content="{TemplateBinding Content}"
|
Content="{TemplateBinding Content}"
|
||||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||||
|
|
|
||||||
|
|
@ -49,5 +49,14 @@ namespace MapControl
|
||||||
{
|
{
|
||||||
DefaultStyleKeyProperty.OverrideMetadata(typeof(Pushpin), new FrameworkPropertyMetadata(typeof(Pushpin)));
|
DefaultStyleKeyProperty.OverrideMetadata(typeof(Pushpin), new FrameworkPropertyMetadata(typeof(Pushpin)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static readonly DependencyProperty CornerRadiusProperty = DependencyProperty.Register(
|
||||||
|
nameof(CornerRadius), typeof(CornerRadius), typeof(Pushpin));
|
||||||
|
|
||||||
|
public CornerRadius CornerRadius
|
||||||
|
{
|
||||||
|
get { return (CornerRadius)GetValue(CornerRadiusProperty); }
|
||||||
|
set { SetValue(CornerRadiusProperty, value); }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,17 +53,19 @@
|
||||||
<Style TargetType="map:Pushpin" BasedOn="{StaticResource ContentControlStyle}">
|
<Style TargetType="map:Pushpin" BasedOn="{StaticResource ContentControlStyle}">
|
||||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
<Setter Property="VerticalAlignment" Value="Bottom"/>
|
<Setter Property="VerticalAlignment" Value="Bottom"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="CornerRadius" Value="5"/>
|
||||||
<Setter Property="Padding" Value="7,5"/>
|
<Setter Property="Padding" Value="7,5"/>
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="map:Pushpin">
|
<ControlTemplate TargetType="map:Pushpin">
|
||||||
<map:PushpinBorder
|
<map:PushpinBorder
|
||||||
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
||||||
Padding="{TemplateBinding Padding}"
|
|
||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}"
|
||||||
BorderBrush="{TemplateBinding BorderBrush}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
BorderWidth="1"
|
BorderWidth="{Binding BorderThickness.Left, RelativeSource={RelativeSource TemplatedParent}}"
|
||||||
CornerRadius="5">
|
CornerRadius="{TemplateBinding CornerRadius}"
|
||||||
|
Padding="{TemplateBinding Padding}">
|
||||||
<ContentPresenter
|
<ContentPresenter
|
||||||
Content="{TemplateBinding Content}"
|
Content="{TemplateBinding Content}"
|
||||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||||
|
|
|
||||||
|
|
@ -49,17 +49,19 @@
|
||||||
<Style TargetType="map:Pushpin" BasedOn="{StaticResource ContentControlStyle}">
|
<Style TargetType="map:Pushpin" BasedOn="{StaticResource ContentControlStyle}">
|
||||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
<Setter Property="VerticalAlignment" Value="Bottom"/>
|
<Setter Property="VerticalAlignment" Value="Bottom"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="CornerRadius" Value="5"/>
|
||||||
<Setter Property="Padding" Value="7,5"/>
|
<Setter Property="Padding" Value="7,5"/>
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="map:Pushpin">
|
<ControlTemplate TargetType="map:Pushpin">
|
||||||
<map:PushpinBorder
|
<map:PushpinBorder
|
||||||
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
||||||
Padding="{TemplateBinding Padding}"
|
|
||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}"
|
||||||
BorderBrush="{TemplateBinding BorderBrush}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
BorderWidth="1"
|
BorderWidth="{Binding BorderThickness.Left, RelativeSource={RelativeSource TemplatedParent}}"
|
||||||
CornerRadius="5">
|
CornerRadius="{TemplateBinding CornerRadius}"
|
||||||
|
Padding="{TemplateBinding Padding}">
|
||||||
<ContentPresenter
|
<ContentPresenter
|
||||||
Content="{TemplateBinding Content}"
|
Content="{TemplateBinding Content}"
|
||||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue