Adding Controls at Runtime

Conclusion

The key to using Windows Forms controls in your Word or Excel solutions is to think about what user-interface options meet your requirements. VSTO provides you with considerable flexibility for extending the user interface of Word or Excel, and there is no one right answer as to which is the best way. Windows Forms controls allow you to extend the capabilities that ActiveX controls provided while leveraging the ever-growing Windows Forms controls ecosystem.

This chapter described how you can use Windows Forms controls to extend your Office solutions. In particular, the chapter examined how hosting controls on the document surface is a very powerful tool for developing applications. The chapter also covered the architecture of hosting controls on the document surface and the limitations and differences in this model compared to traditional Windows Forms development. Chapter 15 continues the discussion about Windows Forms and Office, specifically showing how to use Windows Forms controls on Office's Document Actions task pane.

Категории