December 2019
Intermediate to advanced
528 pages
11h 19m
English
Finally, we have the second row, which is simply another grid inside the first. The interesting part is shown in the following code:
<TextBox Grid.Column="0" Grid.Row="0" x:Name="SendMsg" Text="{Binding MessageText}"/> <Button Grid.Row="0" Grid.Column="1" Command="{Binding SendMessageCommand}" CommandParameter="{Binding ElementName=SendMsg, Path=Text, Mode=OneWay}" Content="Send" />
In the TextBox, we're binding the contents to something called MessageText. Again, don't worry about what MessageText is, although, given that it is bound to a Text property, we can safely assume that it is (or must be) a string.
Finally, we have a button and something called command binding. Unlike the other bindings, where we are, ...