-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainPage.xaml
More file actions
26 lines (24 loc) · 1.37 KB
/
MainPage.xaml
File metadata and controls
26 lines (24 loc) · 1.37 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
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:CRUDWebAPI"
x:Class="CRUDWebAPI.MainPage">
<StackLayout>
<Button Text="Add Employee" Command="{Binding AddEmployee}"/>
<ListView ItemsSource="{Binding Employees}" HasUnevenRows="True" IsPullToRefreshEnabled="True"
IsRefreshing="{Binding IsRefreshing}" RefreshCommand="{Binding RefreshData}" SelectedItem="{Binding SelectedEmployee,Mode=TwoWay}">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Padding="4">
<Label Text="{Binding Name,StringFormat='Name: {0:F0)}'}" TextColor="Black"
FontAttributes="Bold" FontSize="Medium"/>
<Label Text="{Binding Addresss,StringFormat='Address: {0:F0)}'}" TextColor="Blue" FontSize="Medium"/>
<Label Text="{Binding PhoneNumber,StringFormat='Phone: {0:F0)}'}" TextColor="Black" FontSize="Medium"/>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
</ContentPage>