How to bind multiple TextBoxes on one label

Dec 30 2019 12:15 PM
For my exercise:
I have to concat the values of two input fields (string), in order to show them - through a binding object - in a Label
 
Here the XAML Code:
  1. <div>We published plenty of articles, blogs, videos, in the year 2019 under different categories. Thank you, authors, for all the contributions.</div>  
  2. <div> </div>  
  3. <div>Here are the top 20 C# Corner authors based on the number of articles, blogs, videos, and total points earned in the year 2019.</div>  
  4. <Grid>  
  5.    
  6. <TextBox x:Name="txtFirstName" HorizontalAlignment="Left" Height="45" Margin="35,84,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="144"  
  7. Text="{Binding ConcatFullName, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"/>  
  8.    
  9. <TextBox x:Name="txtLastName" HorizontalAlignment="Left" Height="45" Margin="210,84,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="144"  
  10. Text="{Binding ConcatFullName, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"/>  
  11. <Label x:Name="lblConcat" Content="Name Verkettung" HorizontalAlignment="Left" Margin="403,53,0,0" VerticalAlignment="Top" FontSize="16" FontFamily="Segoe UI Black"/>  
  12.    
  13. <Label x:Name="lblConcatTheFullName" HorizontalAlignment="Left" Margin="403,84,0,0" VerticalAlignment="Top" Width="144"  
  14. Foreground="#FF002DFF" FontSize="14" Height="45" Content="{Binding ConcatFullName}"/>  
  15. </Grid> 

Answers (2)