Data Binding in XAML

See given below steps:

1
Create new project.




2.
Right side in Solution Explorer double click on MainPage.xaml
.



3. Write the following XAML code in Grid.
  1. <StackPanel>  
  2.    <!--First TextBox-->  
  3.    <TextBox Name="FirstTextBox">  
  4.    </TextBox>  
  5.    <!--Second TextBox-->  
  6.    <TextBox Name="SecondTextBox" Text="{Binding ElementName=FirstTextBox, Path=Text}">  
  7.    </TextBox>  
  8. </StackPanel> 




















4. Here you get the your working app on Emulator.




Ebook Download
View all
Learn
View all