Let us say that I have an empty Textblock :
textblock1.Text = "";
Then I only put Inlines content in it with these two statements:
textblock1.Inlines.Add(new Run() { Text = "A. ", Foreground = Brushes.Red });
textblock1.Inlines.Add(new Run() { Text = responses.Current.Value, Foreground = Brushes.Black});
The amazing stuff is that I can visualize the content properly in my window, however the Text property of the Textblock keeps being empty! This causes a problem because I need to pass the value of this Textblock to an other Textblock.
The other thing I really can't figure out is that when I call my function for second time, the textblock1.Text property is being updated properly ! It is updated properly for every call but the first ! I've spent hours on msdn but I'm really confused. Moreover, I can read that on the website :
The Text property returns a value (the appended text of all Run elements in the InlineCollection). However, the returned value does not include any formatting that has been applied to the Run elements.
I have very carefully checked my code and debugged to see if there were any other place where I manipulate these property, but I haven't found one. If anyone has any idea, to me this thing is becoming senseless...