0
我遇到问题。我需要在所有文本框中有双格式值。WPF TextBox StringFormat不与PropertyChanged一起使用
当您在此输入内容时,在失去焦点后,它将被格式化。
<TextBox Text="{Binding ABC, StringFormat='{}{0:N}'}" />
将此UpdateSourceTrigger与propertychanged一起添加时出现问题。那么它将永远不会被格式化。
<TextBox Text="{Binding ABC, UpdateSourceTrigger=PropertyChanged, StringFormat='{}{0:N}'}" />
这是为什么?有什么方法可以解决这个问题吗? (在优选XAML)
尝试此 http://stackoverflow.com/questions/3200464/problem-with-updatesourcetrigger-propertychanged-and-stringformat-in-wpf – 2014-06-29 03:48:22