57 lines
2.0 KiB
XML
57 lines
2.0 KiB
XML
<Window x:Class="Yapper.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:local="clr-namespace:Yapper"
|
|
xmlns:viewmodel="clr-namespace:YapperClient.MVVM.ViewModel"
|
|
mc:Ignorable="d"
|
|
Title="MainWindow" Height="474" Width="816">
|
|
|
|
<Window.DataContext>
|
|
<viewmodel:MainViewModel/>
|
|
</Window.DataContext>
|
|
|
|
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="200"/>
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<DockPanel>
|
|
<TextBox Height="25"
|
|
DockPanel.Dock="Top"
|
|
Text="{Binding UserName, UpdateSourceTrigger=PropertyChanged}"
|
|
/>
|
|
<Button Height="25"
|
|
DockPanel.Dock="Top"
|
|
Content="connect"
|
|
Command="{Binding ConnectToServerCommand}"
|
|
/>
|
|
<ListView
|
|
ItemsSource="{Binding Users}"
|
|
>
|
|
<ListView.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding UserName}"/>
|
|
</DataTemplate>
|
|
</ListView.ItemTemplate>
|
|
</ListView>
|
|
</DockPanel>
|
|
|
|
<StackPanel Grid.Column="1">
|
|
<ListView Height="380"
|
|
ItemsSource="{Binding Messages}"></ListView>
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBox Height="55" Width="545" VerticalContentAlignment="Center"
|
|
Text="{Binding Message, UpdateSourceTrigger=PropertyChanged}"></TextBox>
|
|
<Button Width="55" Content="send"
|
|
Command="{Binding SendMessageCommand}"/>
|
|
</StackPanel>
|
|
|
|
</StackPanel>
|
|
</Grid>
|
|
</Window>
|