-
Notifications
You must be signed in to change notification settings - Fork 521
/
Copy pathCreateAndSaveKmlFile.xaml
105 lines (105 loc) · 4.54 KB
/
CreateAndSaveKmlFile.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<ContentPage x:Class="ArcGIS.Samples.CreateAndSaveKmlFile.CreateAndSaveKmlFile"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:converters="clr-namespace:ArcGIS.Converters"
xmlns:esriUI="clr-namespace:Esri.ArcGISRuntime.Maui;assembly=Esri.ArcGISRuntime.Maui">
<ContentPage.Resources>
<ResourceDictionary>
<converters:ImageConverter x:Key="imageConverter" />
<converters:ColorConverter x:Key="colorConverter" />
</ResourceDictionary>
</ContentPage.Resources>
<Grid>
<Grid x:Name="MainUI">
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="*" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<esriUI:MapView x:Name="MyMapView"
Grid.Row="0"
Grid.RowSpan="2" />
<Grid x:Name="StatusGrid" BackgroundColor="DimGray">
<Label x:Name="Status"
Grid.Row="0"
Margin="5"
HorizontalOptions="FillAndExpand"
Text="Select the type of feature you would like to add."
TextColor="White" />
</Grid>
<Grid Grid.Row="2">
<Grid x:Name="ShapeGrid">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button Grid.Column="0"
Clicked="Edit_Click"
Text="Point" />
<Button Grid.Column="1"
Clicked="Edit_Click"
Text="Polyline" />
<Button Grid.Column="2"
Clicked="Edit_Click"
Text="Polygon" />
</Grid>
<Button x:Name="CompleteButton"
Clicked="Complete_Click"
IsVisible="False"
Text="Complete Geometry" />
</Grid>
<Grid x:Name="SaveResetGrid" Grid.Row="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button Grid.Column="0"
Clicked="Save_Click"
Text="Save" />
<Button Grid.Column="1"
Clicked="Reset_Click"
Text="Reset" />
</Grid>
</Grid>
<Grid x:Name="StyleUI" IsVisible="False">
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="*" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<Label Grid.Row="0"
Margin="5"
HorizontalTextAlignment="Center"
Text="Select a style for the placemark." />
<ListView x:Name="IconPicker"
Grid.Row="1"
ItemSelected="Apply_Style_Click">
<ListView.ItemTemplate>
<DataTemplate>
<ImageCell ImageSource="{Binding Path=., Converter={StaticResource imageConverter}}" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<ListView x:Name="ColorPicker"
Grid.Row="1"
IsVisible="False"
ItemSelected="Apply_Style_Click">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Grid Margin="2"
BackgroundColor="{Binding Converter={StaticResource colorConverter}}"
HeightRequest="25"
WidthRequest="-1" />
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<Button Grid.Row="2"
Clicked="No_Style_Click"
Text="Dont Apply Style" />
</Grid>
</Grid>
</ContentPage>