-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathMainPage.xaml
36 lines (36 loc) · 2.38 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
36
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="GridDatafromSQLite.MainPage"
xmlns:dx="http://schemas.devexpress.com/maui"
Title="Contacts">
<Grid>
<dx:DataGridView x:Name="dataGrid" ItemsSource="{Binding GridDataCollection}" EditorShowMode="Never" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" >
<dx:DataGridView.Columns>
<dx:TemplateColumn FieldName="LastName" Caption="Contact" SortOrder="Ascending">
<dx:TemplateColumn.DisplayTemplate>
<DataTemplate>
<Grid RowDefinitions="Auto,*,*" Margin="12,16,0,16" RowSpacing="4">
<dx:DXStackLayout Orientation="Horizontal" Grid.Row="0" Padding="0,0,0,6">
<Label Text="{Binding Item.FirstName}" Padding="0,0,5,0" FontSize="18" FontAttributes="Bold"/>
<Label Text="{Binding Item.LastName}" FontSize="18" FontAttributes="Bold"/>
</dx:DXStackLayout>
<dx:DXStackLayout Orientation="Horizontal" Grid.Row="1" Opacity="0.7">
<Label Text="☎️" Padding="0,0,5,0" />
<Label Text="{Binding Item.HomePhone}" Padding="0,0,12,0" />
<Label Text="📍" Padding="0,0,5,0" />
<Label Text="{Binding Item.Address}"/>
<Label Text=", " Padding="0,0,4,0"/>
<Label Text="{Binding Item.City}"/>
</dx:DXStackLayout>
<dx:DXStackLayout Orientation="Horizontal" Grid.Row="2" Opacity="0.7" >
<Label Text="🏢" Padding="0,0,5,0" FontSize="14"/>
<Label Text="{Binding Item.Company}" FontSize="14"/>
</dx:DXStackLayout>
</Grid>
</DataTemplate>
</dx:TemplateColumn.DisplayTemplate>
</dx:TemplateColumn>
</dx:DataGridView.Columns>
</dx:DataGridView>
</Grid>
</ContentPage>