wpf - Binding the content of a Span -


I have a window that displays the text, there are two parts of the text: first fixed, while the other The need to have the contents of the dependency property declared on the window.

I considered using a spelled text block, the first of which is the definitive content and from which there is variable content in the other, but on the SPAN class, I can not see anything clear Dependency dependent will depend on dependencies.

I am currently using two label stacked one side but it is ugly and if I want to retrieve the contents of the entire text block (as I did it, then that device Displaying tooltips in that the window is too large to display the entire text block) does not help me.

Can anyone help me solve this seemingly simple problem? Thank you.

If you are using .NET 4:

  & Lt; TextBlock & gt; & Lt; Run text = "fixed:" /> & Lt; Run text = "{binding variable}" /> & Lt; / TextBlock & gt;  

Before .NET 4, play 's text property was not a dependency property.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -