Using behavior in MVVM WPF?

I am new to WPF MVVM. Anyone clean up using Behaviors in an MVVM application in WPF ?. Why should we go for Behavior, even if we have a “Method” action in MVVM WPF?

+5
source share
3 answers

A Behavior is what you attach to an element, and indicates when the application should respond.

The action is attached to the behavior and determines what the application should do when the behavior starts.

From this article:

: . , , . ; : , . , , , : , , .

:

.

+6

MVVM , ViewModel , . .

" WPF MVVM", , " " WPF. MVVM, " ", . MVVM .

, , MVVM.

0

,
- -
- .

, , , . , , , , . XAML.

Binding an event to an object and performing something when it occurs is certainly not a breakthrough innovation, imagination on any site. In this sense, attached behavior is another way to do the same. However, the importance of this method is that it has a name, which is probably the most important aspect of any design drawing. In addition, you can create attached behaviors and apply them to any element without having to modify any other part of the system. This is a pure solution to the problem raised by Pascal Binggeli, and many, many other problems. This is a very useful tool in the toolbar.

0
source

All Articles