Search code examples
c#wpfbindingtextblock

How can I bind data to the contents of a Run?


I want to construct a TextBlock consisting of several Run elements, with their contents bound to string variables, but Visual Studio complains, saying that one can only bind to a dependency property, which Run.Text isn't.

Is there anything that can be done?


Solution

  • Check out the BindableRun class - that should probably do what you want.