1.

What Are The Responsibilities Of View?

Answer»

The main purpose and responsibilities of views is to define the structure of what the user sees on the SCREEN. The structure CONTAINS static and dynamic parts.

• Static parts are the XAML hierarchy that defines the controls and layout of controls that a view is composed of.
• Dynamic part is like animations or state changes that are defined as part of the View.
• The primary goal of MVVM is that there should be no code behind in the view.
• In view you at least need the constructor and a call to initialize component.
• The event handling, action and data MANIPULATION LOGIC code shouldn’t be in the code behind in View.
• There are also other kinds of code that have to go in the code behind any code that's required to have a reference to UI element. It is inherently view code.

The main purpose and responsibilities of views is to define the structure of what the user sees on the screen. The structure contains static and dynamic parts.

• Static parts are the XAML hierarchy that defines the controls and layout of controls that a view is composed of.
• Dynamic part is like animations or state changes that are defined as part of the View.
• The primary goal of MVVM is that there should be no code behind in the view.
• In view you at least need the constructor and a call to initialize component.
• The event handling, action and data manipulation logic code shouldn’t be in the code behind in View.
• There are also other kinds of code that have to go in the code behind any code that's required to have a reference to UI element. It is inherently view code.



Discussion

No Comment Found