-
Notifications
You must be signed in to change notification settings - Fork 525
/
Copy pathEditFeatureAttachments.xaml
66 lines (66 loc) · 3.52 KB
/
EditFeatureAttachments.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
<ContentPage x:Class="ArcGIS.Samples.EditFeatureAttachments.EditFeatureAttachments"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:esriUI="clr-namespace:Esri.ArcGISRuntime.Maui;assembly=Esri.ArcGISRuntime.Maui">
<ContentPage.Resources>
<Style x:Key="IconStyle" TargetType="Button">
<Style.Setters>
<Setter Property="FontFamily" Value="calcite-ui-icons-24" />
<Setter Property="FontSize" Value="20" />
<Setter Property="Margin" Value="5" />
</Style.Setters>
</Style>
</ContentPage.Resources>
<Grid Style="{DynamicResource EsriSampleContainer}">
<esriUI:MapView x:Name="MyMapView"
GeoViewTapped="MapView_Tapped"
Style="{DynamicResource EsriSampleGeoView}" />
<Border Style="{DynamicResource EsriSampleControlPanel}">
<StackLayout>
<Label Margin="5"
FontAttributes="Bold"
HorizontalTextAlignment="Center"
Text="Tap features to select. Download, upload, or delete attachments." />
<ListView x:Name="AttachmentsListBox"
HeightRequest="100"
IsEnabled="False">
<!-- ItemTemplate defines how each item (Attachment) is rendered. -->
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Grid ColumnDefinitions="*,auto,auto" RowDefinitions="auto">
<Label Margin="5"
Text="{Binding Name}"
VerticalTextAlignment="Center" />
<!-- DataTemplate sets the item as the button's DataContext automatically. -->
<Button Grid.Column="1"
Clicked="DownloadAttachment_Click"
Style="{StaticResource IconStyle}"
Text=""
ToolTipProperties.Text="Download" />
<Button Grid.Column="2"
Clicked="DeleteAttachment_Click"
Style="{StaticResource IconStyle}"
Text=""
ToolTipProperties.Text="Delete" />
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<Grid ColumnDefinitions="auto,auto">
<Label Grid.Column="1"
HorizontalOptions="End"
Text="Add attachment"
VerticalOptions="Center" />
<Button x:Name="AddAttachmentButton"
Clicked="AddAttachment_Click"
IsEnabled="False"
Style="{StaticResource IconStyle}"
Text=""
ToolTipProperties.Text="Add attachment" />
</Grid>
</StackLayout>
</Border>
</Grid>
</ContentPage>