-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
MapWithItemsSourceGallery.xaml
35 lines (35 loc) · 1.14 KB
/
MapWithItemsSourceGallery.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:map="clr-namespace:Xamarin.Forms.Maps;assembly=Xamarin.Forms.Maps"
x:Class="Xamarin.Forms.Controls.GalleryPages.MapWithItemsSourceGallery">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<map:Map ItemsSource="{Binding Places}"
x:Name="_map">
<map:Map.ItemTemplate>
<DataTemplate>
<map:Pin Position="{Binding Position}"
Address="{Binding Address}"
Label="{Binding Description}" />
</DataTemplate>
</map:Map.ItemTemplate>
</map:Map>
<StackLayout Orientation="Horizontal"
Grid.Row="1">
<Button Text="Add"
Command="{Binding AddPlaceCommand}" />
<Button Text="Remove"
Command="{Binding RemovePlaceCommand}" />
<Button Text="Clear"
Command="{Binding ClearPlacesCommand}" />
<Button Text="Update"
Command="{Binding UpdatePlacesCommand}" />
<Button Text="Replace"
Command="{Binding ReplacePlaceCommand}" />
</StackLayout>
</Grid>
</ContentPage>