Created
February 20, 2016 21:54
-
-
Save georgechond94/5a22b0b808fff29ebb27 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
<Page | |
x:Class="ChatApplication.MainPage" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:local="using:ChatApplication" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
mc:Ignorable="d" | |
> | |
<RelativePanel> | |
<TextBox x:Name="name" RelativePanel.AlignRightWithPanel="True" RelativePanel.AlignLeftWithPanel="True" RelativePanel.AlignTopWithPanel="True"></TextBox> | |
<ListView x:Name="lv" ItemsSource="{Binding Messages}" RelativePanel.Above="rp" RelativePanel.AlignLeftWithPanel="True" RelativePanel.AlignRightWithPanel="True" RelativePanel.Below="name"> | |
<ListView.ItemTemplate> | |
<DataTemplate x:DataType="local:ChatMessage"> | |
<StackPanel Orientation="Horizontal"> | |
<TextBlock> | |
<Run Text="{x:Bind Username}"></Run> | |
<Run Text=": "></Run> | |
<Run Text="{x:Bind Message}"></Run> | |
</TextBlock> | |
</StackPanel> | |
</DataTemplate> | |
</ListView.ItemTemplate> | |
</ListView> | |
<RelativePanel x:Name="rp" RelativePanel.AlignBottomWithPanel="True" RelativePanel.AlignLeftWithPanel="True" RelativePanel.AlignRightWithPanel="True"> | |
<TextBox x:Name="text" RelativePanel.AlignLeftWithPanel="True" RelativePanel.LeftOf="send" ></TextBox> | |
<Button x:Name="send" RelativePanel.AlignRightWithPanel="True" Content="Send" Click="send_Click"></Button> | |
</RelativePanel> | |
</RelativePanel> | |
</Page> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment