mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 22:46:58 +00:00
Avalonia MapItemsControl
This commit is contained in:
parent
39e00b30d9
commit
e9e0393074
11 changed files with 206 additions and 68 deletions
|
|
@ -12,25 +12,23 @@
|
|||
Center="53.5,8.2"
|
||||
DoubleTapped="OnMapDoubleTapped">
|
||||
|
||||
<ItemsControl ItemsSource="{Binding Pushpins}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<map:MapPanel/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.Styles>
|
||||
<Style Selector="ContentPresenter">
|
||||
<map:MapItemsControl ItemsSource="{Binding Pushpins}" Background="{x:Null}">
|
||||
<map:MapItemsControl.Styles>
|
||||
<Style Selector="map|MapItem">
|
||||
<Setter Property="map:MapPanel.Location" Value="{Binding Location}"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Bottom"/>
|
||||
<Setter Property="map:MapPanel.Location" Value="{Binding Location}"/>
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<map:Pushpin Content="{Binding Name}"/>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ItemsControl.Styles>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<map:Pushpin Content="{Binding Name}"/>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<Style Selector="map|MapItem[IsSelected=True]">
|
||||
<Setter Property="Foreground" Value="Red"/>
|
||||
</Style>
|
||||
</map:MapItemsControl.Styles>
|
||||
</map:MapItemsControl>
|
||||
|
||||
<map:MapPath Location="53.5,8.2" Stroke="Blue" StrokeThickness="3" Fill="#1F007F00">
|
||||
<map:MapPath.Data>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue