在XAML有没有办法为默认的UpdateSourceTrigger到的PropertyChanged? [英] In XAML is there a way to default the UpdateSourceTrigger to PropertyChanged?

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

问题描述

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

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

http://msdn.microsoft.com/en-us/library/system.windows.data.binding.updatesourcetrigger.aspx

http://msdn.microsoft.com/en-us/library/system.windows.data.updatesourcetrigger.aspx

推荐答案

在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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆