Search code examples
c#xamltextblock

XAML Variables displayed in TextBlock


I am a complete newb into XAML. I have previously worked with C#, C++, and ASP.net however if that helps. Here is what I want to do; dynamically display a string variable (lets call it "debt") that is declared in the c# code behind. Is there a simple way to do this using a TextBlock call?


Solution

  • In the code behind:

    TextBox.Text = debt;