- 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.
推薦閱讀
- Oracle Database In-Memory(架構與實踐)
- 劍指Offer(專項突破版):數據結構與算法名企面試題精講
- 架構不再難(全5冊)
- C語言程序設計案例式教程
- Magento 1.8 Development Cookbook
- Python機器學習實戰
- Flux Architecture
- C語言課程設計
- SQL Server實用教程(SQL Server 2008版)
- JavaScript+jQuery網頁特效設計任務驅動教程
- JavaScript編程精解(原書第2版)
- C/C++代碼調試的藝術(第2版)
- Using Yocto Project with BeagleBone Black
- Bitcoin Essentials
- jQuery Essentials