Binding only part of a label

前端 未结 6 1779
说谎
说谎 2020-12-14 01:30

How would one achieve mixing bound values with constant text in a WPF bound control?

For example, say I have a form displaying orders, and I want a label that displa

6条回答
  •  心在旅途
    2020-12-14 02:21

    Another approach is to use a single TextBlock with multiple Run elements within it:

    HelloWorld
    

    .. but to bind to a element you need to use add a BindableRun class.

    Update But there are some drawbacks to this technique ... see here

提交回复
热议问题