Skip to content

Instantly share code, notes, and snippets.

@winstongubantes
Created February 3, 2017 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save winstongubantes/694c27d2a04cf77e8be5c4d384c76f62 to your computer and use it in GitHub Desktop.
Save winstongubantes/694c27d2a04cf77e8be5c4d384c76f62 to your computer and use it in GitHub Desktop.
<?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:viewModels="clr-namespace:TravelAppMobile.ViewModels;assembly=TravelAppMobile"
x:Class="TravelAppMobile.Pages.TravelAgentPage"
Title="Travel Agent">
<ContentPage.BindingContext>
<viewModels:TravelAgentPageViewModel></viewModels:TravelAgentPageViewModel>
</ContentPage.BindingContext>
<ContentPage.Content>
<StackLayout Orientation="Vertical"
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand">
<ListView ItemsSource="{Binding Messages}"
Margin="10"
HasUnevenRows="True"
IsPullToRefreshEnabled="True"
IsRefreshing="{Binding IsRefreshing }">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand"
Orientation="Horizontal">
<Image Source="{Binding UserImageUrl}"></Image>
<Label Text="{Binding Message}"></Label>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<StackLayout VerticalOptions="End" HorizontalOptions="FillAndExpand">
<Entry Placeholder="Please enter message.." Text="{Binding TextMessage}"></Entry>
<Button Text="Send" Command="{Binding SendMessageCommand}"></Button>
</StackLayout>
</StackLayout>
</ContentPage.Content>
</ContentPage>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment