-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathMainPage.xaml
46 lines (45 loc) · 3.02 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
37
38
39
40
41
42
43
44
45
46
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="GridDatafromFireBase.MainPage"
xmlns:dx="http://schemas.devexpress.com/maui" Title="Employee View">
<Grid RowDefinitions="*,Auto,Auto">
<Grid.Resources>
<Style TargetType="Label">
<Setter Property="FontSize" Value="16"/>
<Setter Property="FontAttributes" Value="Bold"/>
</Style>
</Grid.Resources>
<dx:DataGridView x:Name="datagrid" Grid.Row="0" EditorShowMode="Never" IsReadOnly="False" VerticalLineThickness="1">
<dx:DataGridView.GroupCaptionTemplate>
<DataTemplate>
<Label Text="{Binding GroupValue}"/>
</DataTemplate>
</dx:DataGridView.GroupCaptionTemplate>
<dx:DataGridView.CellAppearance>
<dx:CellAppearance BorderColor="Transparent" HorizontalLineThickness="0"/>
</dx:DataGridView.CellAppearance>
<dx:DataGridView.Columns>
<dx:TemplateColumn MinWidth="250" Caption="Employee" FieldName="LastName">
<dx:TemplateColumn.DisplayTemplate>
<DataTemplate>
<Grid VerticalOptions="Center" Padding="15, 10, 0, 10" RowDefinitions="*, Auto" ColumnDefinitions="Auto, 3*, *, *">
<Border Grid.RowSpan="2" BackgroundColor="White" WidthRequest="50" HeightRequest="50" Margin="0,0,15,0" Grid.Column="0" VerticalOptions="Center">
<Border.Clip>
<EllipseGeometry RadiusX="25" RadiusY="25" Center="25,25"/>
</Border.Clip>
<dx:DXImage Source="{Binding Item.Image}" Grid.Column="0" Grid.RowSpan="2" WidthRequest="80" HeightRequest="80" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" Margin="0,30,0,0"/>
</Border>
<dx:DXStackLayout Orientation="Horizontal" Grid.Row="0" Grid.Column="1">
<Label Text="{Binding Item.FirstName}" Padding="0,0,4,0"/>
<Label Text="{Binding Item.LastName}" />
</dx:DXStackLayout>
<Label Text="{Binding Item.Phone}" FontAttributes="None" FontSize="14" Grid.Column="1" Grid.Row="1" Margin="0,0,0,0"/>
</Grid>
</DataTemplate>
</dx:TemplateColumn.DisplayTemplate>
</dx:TemplateColumn>
<dx:DateColumn FieldName="HireDate" DisplayFormat="d" VerticalContentAlignment="Center" HorizontalContentAlignment="End" SortOrder="Descending" />
<dx:TextColumn FieldName="GroupName" MinWidth="120" VerticalContentAlignment="Center" IsGrouped="true" />
</dx:DataGridView.Columns>
</dx:DataGridView>
</Grid>
</ContentPage>