-
Notifications
You must be signed in to change notification settings - Fork 531
Expand file tree
/
Copy pathCreateDynamicBasemapGallery.xaml
More file actions
91 lines (89 loc) · 4.47 KB
/
CreateDynamicBasemapGallery.xaml
File metadata and controls
91 lines (89 loc) · 4.47 KB
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
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage x:Class="ArcGIS.Samples.CreateDynamicBasemapGallery.CreateDynamicBasemapGallery"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:converters="clr-namespace:ArcGIS.Converters"
xmlns:calcite="http://schemas.esri.com/calcite/2024"
xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013"
xmlns:esriUI="clr-namespace:Esri.ArcGISRuntime.Maui;assembly=Esri.ArcGISRuntime.Maui"
xmlns:mapping="clr-namespace:Esri.ArcGISRuntime.Mapping;assembly=Esri.ArcGISRuntime">
<ContentPage.Resources>
<converters:RuntimeImageToImageSourceConverter x:Key="RuntimeImageToImageSource" />
</ContentPage.Resources>
<Grid>
<esriUI:MapView x:Name="MyMapView" />
<Button x:Name="ShowGalleryButton"
Margin="10"
Background="#AA333333"
BorderColor="Transparent"
Clicked="ShowGallery_Clicked"
FontSize="{OnIdiom Default=80,
Phone=50}"
HorizontalOptions="Start"
TextColor="White"
ToolTipProperties.Text="Show Gallery"
VerticalOptions="Start"
ImageSource="{calcite:CalciteIconImageSource Icon=Basemap, Size={OnIdiom Default=70, Phone=50}, Scale=Large}"/>
<Border x:Name="TransparentBackground"
Background="#AA333333"
IsVisible="False">
<Border.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped" />
</Border.GestureRecognizers>
</Border>
<StackLayout x:Name="DynamicBasemapStyleGallery"
Margin="5"
Padding="5"
Background="{AppThemeBinding Light=#dfdfdf,
Dark=#303030}"
IsVisible="False"
MaximumHeightRequest="{OnIdiom Default=850,
Phone=650}"
MaximumWidthRequest="{OnIdiom Default=400,
Phone=300}"
Spacing="5">
<CollectionView x:Name="BasemapStyleGallery"
Margin="5"
MaximumHeightRequest="{OnIdiom Default=500,
Phone=300}"
SelectionChanged="BasemapStyleGallery_SelectionChanged"
SelectionMode="Single">
<CollectionView.ItemTemplate>
<DataTemplate x:DataType="esri:BasemapStyleInfo">
<StackLayout Margin="5">
<Label FontAttributes="Bold" Text="{Binding StyleName}" />
<Image HeightRequest="{OnIdiom Default=200,
Phone=150}"
HorizontalOptions="Start"
Source="{Binding Thumbnail, Converter={StaticResource RuntimeImageToImageSource}}" />
</StackLayout>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
<Label FontAttributes="Bold" Text="Language strategy:" />
<Picker x:Name="StrategyPicker"
Margin="5"
HorizontalOptions="Fill"
IsEnabled="False" />
<Label Margin="5"
FontAttributes="Bold"
Text="Language:" />
<Picker x:Name="LanguagePicker"
Margin="5"
HorizontalOptions="Fill"
IsEnabled="False"
x:DataType="esri:BasemapStyleLanguageInfo"
ItemDisplayBinding="{Binding DisplayName}" />
<Label FontAttributes="Bold" Text="Worldview:" />
<Picker x:Name="WorldviewPicker"
Margin="5"
HorizontalOptions="Fill"
IsEnabled="False"
x:DataType="esri:Worldview"
ItemDisplayBinding="{Binding DisplayName}" />
<Button Margin="5"
Clicked="LoadButton_Click"
Text="Load" />
</StackLayout>
</Grid>
</ContentPage>