Is it possible to add more characters after a binding in xaml?

后端 未结 7 1147
小蘑菇
小蘑菇 2021-02-02 10:36

I was wondering something, and couldn\'t find any relevant topics. I have following binding :

Content=\"{x:Static resx:Resource.Form_OtherOption_Description}\"
<         


        
7条回答
  •  甜味超标
    2021-02-02 11:28

    If you're using WPF 4.0, you could also do this:

    
           
           
    
    

    This actually concatenates the two strings coming from two Run tag and copied into TextBlock.Text property!.

    Using this approach you can even bind to different properties in presenter, and display it in a single TexBlock. See this excellent example:

    Can we concat two properties in data binding?

提交回复
热议问题