本文介绍了在XAML有没有办法为默认的UpdateSourceTrigger到的PropertyChanged?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在XAML(或code)有没有办法为默认的UpdateSourceTrigger到的PropertyChanged对于所有的绑定?

In XAML (or code) is there a way to default the UpdateSourceTrigger to PropertyChanged for all bindings?

推荐答案

在WPF中,UpdateSourceTrigger已diffeent默认值,每个控制和他们是没有办法设置的东西,将控制所有的元素是如何设定自己的UpdateSourceTrigger的!您可以definetely创建可走通的网页和更改所有值的附加的行为?

In WPF, the UpdateSourceTrigger has diffeent default values for each control and their is no way of setting something that will control how all the elements set their UpdateSourceTrigger! You can definetely create a attached behavior that can go thru a page and change all the values?

<Window
     local:DefaultUpdateSourceTrigger="PropertyChanged">

</Window>

这可以步行可视化树,改变UpdateSourceTriggers!

This can then walk the visual tree and change the UpdateSourceTriggers!

这篇关于在XAML有没有办法为默认的UpdateSourceTrigger到的PropertyChanged?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 02:39