-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathMainPage.xaml
35 lines (35 loc) · 1.92 KB
/
MainPage.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
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:dx="http://schemas.devexpress.com/maui"
xmlns:local="clr-namespace:PullToRefresh"
xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls"
ios:Page.UseSafeArea="true"
x:Class="PullToRefresh.MainPage">
<ContentPage.BindingContext>
<local:ViewModel/>
</ContentPage.BindingContext>
<dx:DataGridView ItemsSource="{Binding Products}" IsReadOnly="True"
IsPullToRefreshEnabled="true"
PullToRefreshCommand="{Binding PullToRefreshCommand}"
IsRefreshing="{Binding IsRefreshing, Mode=TwoWay}"
IndicatorColor="GreenYellow">
<dx:DataGridView.Columns>
<dx:ImageColumn FieldName="Photo" Width="170"
VerticalContentAlignment="Center" />
<dx:TemplateColumn FieldName="Name" Caption="Product Category">
<dx:TemplateColumn.DisplayTemplate>
<DataTemplate>
<Grid BindingContext="{Binding Source}" VerticalOptions="Center" Padding="10,0,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label Text="{Binding Item.Name}" FontAttributes="Bold" FontSize="Large"/>
<Label Text="{Binding Item.Description}" Grid.Row="1" FontSize="Medium"/>
</Grid>
</DataTemplate>
</dx:TemplateColumn.DisplayTemplate>
</dx:TemplateColumn>
</dx:DataGridView.Columns>
</dx:DataGridView>
</ContentPage>