to see if they could help me. I have two TextBox each in a different class, and I need what is typed in one to be displayed in the other.
The one that should receive the data I have it like this in xaml:
<TextBox x:Name="mTxtPuntosLocal" Text="{Binding AddPuntoLocal, ElementName=ventana}" HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Top" FontSize="100" Background="{x:Null}" BorderBrush="{x:Null}" Width="135"/>
Right now I take the data to prove that it receives like this:
string varPuntoLocal;
public string AddPuntoLocal
{
get
{
return "3";
}
set
{
varPuntoLocal = value;
}
}
Right now I always get the "3". I need it to show me what is inside another textbox of another class, how I should reference it inside the Biding.
Thank you
I have found on StackOverflow in English the answer to your question. I hope it helps you here I leave the link and I copy the information.
MainWindow.xaml.cs
MainWindow.xaml - Take note of the DataContext line in the window declaration.
Window1.xaml