- Mastering Windows Presentation Foundation
- Sheridan Yuen
- 134字
- 2021-06-24 16:49:01
Views
The Views define the appearance and layout of the UI. They typically connect with a View Model through the use of their DataContext property and display the data that it supplies. They expose the functionality provided by the View Model by connecting its commands to the UI controls that the users interact with.
In general, the basic rule of thumb is that each View has one associated View Model. This does not mean that a View cannot data bind to more than one data source or that we cannot reuse View Models. It simply means that, in general, if we have a class called SecurityView, it is more than likely that we'll also have an instance of a class named SecurityViewModel that will be set as the value of that View's DataContext property.
推薦閱讀
- 玩轉(zhuǎn)Scratch少兒趣味編程
- SQL學(xué)習(xí)指南(第3版)
- WSO2 Developer’s Guide
- C語(yǔ)言程序設(shè)計(jì)
- 基于Swift語(yǔ)言的iOS App 商業(yè)實(shí)戰(zhàn)教程
- Redis Essentials
- Java 9模塊化開發(fā):核心原則與實(shí)踐
- Python Data Structures and Algorithms
- 第一行代碼 C語(yǔ)言(視頻講解版)
- Spring 5 Design Patterns
- Applied Deep Learning with Python
- Java多線程并發(fā)體系實(shí)戰(zhàn)(微課視頻版)
- 例解Python:Python編程快速入門踐行指南
- Practical Responsive Typography
- INSTANT EaselJS Starter