Author: Skute | Posted on: 6/11/2008 6:26:16 AM | Views : 514

Hi, is it possible bind the Text property of a TextBlock to a string? I've tried the following and it doesn't appear to work:
(I think because LogText is initially null, so the operation is DataContext = null) 
logTextBlock.DataContext = this.LogText;
this.LogText = "Hello World";

<TextBlock x:Name="logTextBlock" Text="{Binding Mode=OneWay}"></TextBlock> 
 
Cheers,
Mark 
...

Go to the complete details ...