Can I change the properties of a binding in a DataTrigger, without knowing the binding itself?

后端 未结 5 1309
甜味超标
甜味超标 2021-01-04 13:50

I have a TextBox style that formats a number if the box is unfocused, but leaves the number unformatted whlie it\'s being edited.

This is the style I wa

5条回答
  •  无人及你
    2021-01-04 14:25

    My attempt to solve this ended up with a custom control plus a multi-binding, both of which where suggested above.

    This allowed me to use markup like this:

    < CustomTextBox Value="{Binding Value"} Format="N2" />

    I tried to post my code but I keep getting an error about "code that is not properly formatted as code".

提交回复
热议问题