在WPF MVVM中使用行为? [英] Use of Behavior in WPF MVVM?
本文介绍了在WPF MVVM中使用行为?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是WPF MVVM的新手.有人清除WPF中MVVM应用程序中行为"的用法吗?为什么即使在WPF MVVM中有方法"操作,我们也应该追求行为"?
I am new to WPF MVVM .. Anybody clear the usage of the Behaviors in MVVM application in WPF?. Why we should go for Behavior even we have Method action in WPF MVVM ?
推荐答案
行为是您附加到元素上的东西,它指定应用程序应在何时响应.
A Behavior is the thing you attach to an element and specifies when the application should respond.
动作附加到行为,并定义触发行为后应用程序应该执行的操作.
The Action is attached to the behavior and defines what the application should do when the behavior is triggered.
查看全文