XAML-Map-Control/MapControl/UWP/Themes/Generic.xaml

81 lines
3.9 KiB
Plaintext
Raw Normal View History

<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2021-01-17 21:39:42 +01:00
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:map="using:MapControl">
2021-01-17 21:39:42 +01:00
<Style TargetType="map:MapItemsControl">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<ItemsPresenter/>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<map:MapPanel/>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
</Style>
2021-01-17 21:39:42 +01:00
<Style TargetType="ContentControl" x:Key="ContentControlStyle">
<Setter Property="Foreground" Value="{x:Null}"/>
<Setter Property="Background" Value="{x:Null}"/>
<Setter Property="BorderBrush" Value="{x:Null}"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="VerticalAlignment" Value="Stretch"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
<Setter Property="Template">
<Setter.Value>
2021-01-17 21:39:42 +01:00
<ControlTemplate TargetType="ContentControl">
<ContentPresenter Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
2021-01-17 21:39:42 +01:00
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Margin="{TemplateBinding Padding}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
2021-01-17 21:39:42 +01:00
<Style TargetType="map:MapContentControl" BasedOn="{StaticResource ContentControlStyle}"/>
<Style TargetType="map:MapItem" BasedOn="{StaticResource ContentControlStyle}"/>
<Style TargetType="map:Pushpin" BasedOn="{StaticResource ContentControlStyle}">
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Bottom"/>
2021-01-17 21:39:42 +01:00
<Setter Property="Padding" Value="5,3"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="map:Pushpin">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
2021-01-17 21:39:42 +01:00
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="1">
<ContentPresenter Content="{TemplateBinding Content}"
2021-01-17 23:39:20 +01:00
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Margin="{TemplateBinding Padding}"/>
2021-01-17 21:39:42 +01:00
</Border>
<Path Grid.Row="1"
2021-03-15 19:40:00 +01:00
Data="M0.5,-1.2 L0.5,15 10,-1.2"
2021-01-17 21:39:42 +01:00
Fill="{TemplateBinding Background}"
Stroke="{TemplateBinding BorderBrush}"
StrokeThickness="1"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>