[ADDITION] Added databinding to the chatbox function.

Tried to broadcast the message, doesn't work yet.
This commit is contained in:
Dogukan
2020-10-20 23:54:29 +02:00
parent 4d161391b1
commit 381c142eaa
7 changed files with 81 additions and 27 deletions

View File

@@ -48,8 +48,13 @@
</Border>
<Grid Grid.Column="2" Grid.Row="1">
<TextBox Name="SentMessage" IsReadOnly="True" Margin="0,0,0,50"/>
<TextBox x:Name="ChatBox" Keyboard.KeyDown="ChatBox_KeyDown" Width="200" Height="50" ToolTip="Message goes here" ToolTipService.IsEnabled="True" VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
<ListBox Name ="TextBox" ItemsSource="{Binding Path=Messages}" Margin="0,0,0,69"/>
<TextBox Name="ChatBox" Text="{Binding Message, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="0,465,0,0">
<TextBox.InputBindings>
<KeyBinding Key="Return" Command="{Binding OnKeyDown}"/>
</TextBox.InputBindings>
</TextBox>
</Grid>
</Grid>