用户界面的设计
自定义控件
l 设计器
Ø 不支持自定义控件的开发者
Ø 对控件的使用者完全支持
l 生成 2 个 assembly
Ø 设计时
§包含特定设计器的代码
Ø 运行时
§部署到设备时用到的代码
§轻量级的 – 不包括设计时代码

| If the existing controls do not meet your needs, or if you are a control publisher, you can create your custom controls from scratch or by inheriting from an existing control class. There is no designer support for creating custom controls, however. You will develop the control in the code editor with no visual feedback until you test the control on a device. As the control developer, you can code your control to provide full designer support to the developer that implements your control in an application. This is done just as it is with desktop development, using designer attributes on properties to define how they should behave in the designer.
| There is one major difference in device-control development, however. When you distribute your control, you will provide two different binaries. One binary contains all the run-time control code and the design-time code, including the designer attributes just mentioned. The other binary is a slimmed down version that contains only the code necessary to operate at run-time on the device. The process for creating these two assemblies consists of marking the design-time specific code with a compiler directive and using the command-line compiler to generate the run-time assembly. This process is fully documented in the Compact Framework SDK.