You need a DataBind TextBlock Text (?) Element for your class - for example:
In xaml
<TextBlock x:Name="MyTextBlock" Text={Binding ShowThis, Mode=OneWay} />
in the class:
public class MyDataContextClass { private string showThis = string.Enpty; public string ShowThis { get {return showThis;} set { showThis = value; if (PropertyChanged != null) PropertyChanged(....); } } }
and you need DataBing Xaml to class. (Maybe in the constructor?)
public class MyXamlWindow { public MyXamlWindow() { this.DataContext = new MyDataContextClass(); } }
There are many ways to do everything higher.
Jasper
source share