Is there a way to globally change the default behaviors of bindings in wpf?

前端 未结 3 1700
甜味超标
甜味超标 2020-12-10 15:09

Is there a way to change the default behavior of bindings so i don\'t need to set \'UpdateSourceTrigger=PropertyChanged\' on each, in my case, textbox?

Might this b

3条回答
  •  庸人自扰
    2020-12-10 16:03

    No. This behavior is handled by the DefaultUpdateSourceTrigger of the FrameworkPropertyMetadata class, which is passed when registering a DependencyProperty. It is possible to override this in an inherited class of TextBox and per binding, but not for every TextBox in the application.

提交回复
热议问题