Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
基本上,当金额为负时,我将金额绑定到 Windows Phone 中的 TextBlock,我应该将背景颜色更改为红色。
我们可以通过 0 % c# 代码的 xaml 实现这一点吗?
<TextBlock ... Background="{Binding Amount, Converter={StaticResource AmountToBackgroundBrushConverter}" />
只需制作您自己的 AmountToBackgroundBrushConverter