Blog‎ > ‎

Silverlight – Unable to databind Text on the Run Element

posted Jun 8, 2010, 12:54 PM by Rene Rasmussen
I love the Run element as it provides the ability to align text pieces with different formatting. This works perfect with constant text strings, but when you try to data bind to the Text property on Run it fails.

There are several ideas posted on web (http://forums.silverlight.net/forums/p/13637/53097.aspx) on how to make the Run element support data binding to Text but I have found none of them to be successful.

So if you are in the same situation as was, looking for a solution on how to bind to the Text property on Run, I suggest you stop looking and just set the Text property from code behind. That’s what I ended up doing.
 
By the way, this is only an issue with Silverlight 3 and lower, the issue is solved with Silverlight 4, so if you can upgrade to Silverlight 4, go ahead.

Comments