|
<Window x:Class="MyChat.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:MyChat="clr-namespace:MyChat" Title="My Chat" Height="350" Width="525"
>
<Window.DataContext>
<MyChat:MainViewModel x:Name="viewModel" />
</Window.DataContext>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="200*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="63*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="268*" />
<ColumnDefinition Width="117*" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="1"
Name="textBlock1"
Text="Name"
TextAlignment="Right" />
<TextBlock Grid.Row="2"
Name="textBlock2"
Text="Message"
TextAlignment="Right" />
<TextBox Grid.Column="1"
Grid.Row="1"
Name="textBoxName"
Text="{Binding Path=Name}" />
<TextBox Grid.Column="1"
Grid.Row="2"
Name="textBoxMessage"
Grid.ColumnSpan="2"
VerticalScrollBarVisibility="Auto"
Text="{Binding Path=Message}"
TextWrapping="WrapWithOverflow"
AcceptsReturn="True"
AcceptsTab="True" />
<DataGrid Grid.ColumnSpan="3"
Name="dataGrid1"
AutoGenerateColumns="False"
ItemsSource="{Binding Path=Chat}">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Path=Date}"
Header="Date" />
<DataGridTextColumn Binding="{Binding Path=Name}"
Header="Name" />
<DataGridTextColumn Binding="{Binding Path=Message}"
Header="Message" />
</DataGrid.Columns>
</DataGrid>
<Button Content="Send"
Grid.Column="2"
Grid.Row="1"
Name="buttonSend"
Click="buttonSend_Click" />
</Grid>
</Window>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.