-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCollectionViewSamples.xaml
More file actions
63 lines (56 loc) · 3.09 KB
/
Copy pathCollectionViewSamples.xaml
File metadata and controls
63 lines (56 loc) · 3.09 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
<?xml version="1.0" encoding="utf-8"?>
<dui:ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:dui="http://dips.com/mobile.ui"
xmlns:local="clr-namespace:Components.ComponentsSamples.CollectionView"
x:Class="Components.ComponentsSamples.CollectionView.CollectionViewSamples"
x:DataType="local:CollectionViewSamplesViewModel"
Title="CollectionView">
<dui:ContentPage.BindingContext>
<local:CollectionViewSamplesViewModel />
</dui:ContentPage.BindingContext>
<Grid RowDefinitions="Auto, *">
<!-- Action buttons -->
<dui:ScrollView Orientation="Horizontal"
Grid.Row="0">
<HorizontalStackLayout Spacing="{dui:Sizes size_1}"
Padding="{dui:Thickness Left=content_margin_medium, Right=content_margin_medium, Top=size_1, Bottom=size_1}">
<dui:Button Style="{dui:Styles Button=DefaultSmall}"
Text="Add First"
Command="{Binding AddFirstCommand}" />
<dui:Button Style="{dui:Styles Button=DefaultSmall}"
Text="Add Last"
Command="{Binding AddLastCommand}" />
<dui:Button Style="{dui:Styles Button=DefaultSmall}"
Text="Add Middle"
Command="{Binding AddMiddleCommand}" />
<dui:Button Style="{dui:Styles Button=GhostSmall}"
Text="Remove First"
Command="{Binding RemoveFirstCommand}" />
<dui:Button Style="{dui:Styles Button=GhostSmall}"
Text="Remove Last"
Command="{Binding RemoveLastCommand}" />
<dui:Button Style="{dui:Styles Button=GhostSmall}"
Text="Remove Middle"
Command="{Binding RemoveMiddleCommand}" />
<dui:Button Style="{dui:Styles Button=GhostSmall}"
Text="Clear All"
Command="{Binding ClearAllCommand}" />
<dui:Button Style="{dui:Styles Button=CallToActionSmall}"
Text="Reset"
Command="{Binding ResetCommand}" />
</HorizontalStackLayout>
</dui:ScrollView>
<!-- CollectionView with AutoHideLastDivider and auto corner radius -->
<dui:CollectionView ItemsSource="{Binding Items}"
dui:Layout.AutoHideLastDivider="True"
Grid.Row="1">
<dui:CollectionView.ItemTemplate>
<DataTemplate x:DataType="local:CollectionViewSampleItem">
<dui:ListItem Title="{Binding Title}"
HasBottomDivider="True" />
</DataTemplate>
</dui:CollectionView.ItemTemplate>
</dui:CollectionView>
</Grid>
</dui:ContentPage>