Can we concat two properties in data binding?

后端 未结 6 511
别跟我提以往
别跟我提以往 2021-02-01 13:04

Can we concat two properties together in binding expression? If possible without converter or without writing two textblocks and setting them individually?

6条回答
  •  一向
    一向 (楼主)
    2021-02-01 13:57

    If you want to show, say FirstName and LastName, in a single TextBlock, then you can do like this:

    
         
          
         
    
    

    Now, the TextBlock's Text property will be "Sachin Tendulkar" and will be displayed if:

    FirstName = Sachin
    LastName  = Tendulkar
    

    Hope that helps.

提交回复
热议问题