Created
February 9, 2017 16:21
-
-
Save winstongubantes/bfa1b96794253fdf099889f427c9f20a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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:ConversationApp.ViewModels;assembly=ConversationApp" | |
x:Class="ConversationApp.Pages.ConversationPage"> | |
<ContentPage.BindingContext> | |
<viewModels:ConversationPageViewModel></viewModels:ConversationPageViewModel> | |
</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> | |
<StackLayout Orientation="Vertical"> | |
<Label Text="{Binding Messagetext, StringFormat='Message: {0}'}"></Label> | |
<Label Text="{Binding Sender, StringFormat='Sender: {0}'}"></Label> | |
</StackLayout> | |
</StackLayout> | |
</ViewCell> | |
</DataTemplate> | |
</ListView.ItemTemplate> | |
</ListView> | |
<StackLayout VerticalOptions="End" HorizontalOptions="FillAndExpand"> | |
<Entry Placeholder="Please enter you name.." Text="{Binding UserName}"></Entry> | |
<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