-
Notifications
You must be signed in to change notification settings - Fork 529
Expand file tree
/
Copy pathCategoriesFlyoutContent.xaml
More file actions
44 lines (41 loc) · 2.16 KB
/
Copy pathCategoriesFlyoutContent.xaml
File metadata and controls
44 lines (41 loc) · 2.16 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
<?xml version="1.0" encoding="utf-8" ?>
<ContentView x:Class="ArcGIS.Controls.CategoriesFlyoutContent"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:viewModels="clr-namespace:ArcGIS.ViewModels"
x:DataType="viewModels:FlyoutMenuViewModel">
<CollectionView x:Name="CategoriesCollectionView"
ItemsSource="{Binding Categories}"
SelectionChanged="CategoriesCollectionView_SelectionChanged"
SelectionMode="Single">
<CollectionView.ItemTemplate>
<DataTemplate x:DataType="viewModels:FlyoutCategoryViewModel">
<HorizontalStackLayout HeightRequest="40">
<HorizontalStackLayout.Triggers>
<DataTrigger Binding="{Binding IsSelected}"
TargetType="HorizontalStackLayout"
Value="True">
<Setter Property="BackgroundColor" Value="Grey" />
</DataTrigger>
<DataTrigger Binding="{Binding IsSelected}"
TargetType="HorizontalStackLayout"
Value="False">
<Setter Property="BackgroundColor" Value="Transparent" />
</DataTrigger>
</HorizontalStackLayout.Triggers>
<Label Margin="20,0"
FontFamily="CalciteUIIconsMediumFontFamily"
FontSize="24"
Text="{Binding CategoryIcon}"
TextColor="White"
VerticalOptions="Center" />
<Label Margin="15,0,0,0"
FontSize="16"
Text="{Binding CategoryName}"
TextColor="White"
VerticalOptions="Center" />
</HorizontalStackLayout>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</ContentView>