Skip to content

Repository files navigation

How to create a custom DocumentManager with a custom View and a custom Document

This example demonstrates how to create a custom DocumentManager. Once you place this component onto a form, you can switch (convert) the current View to WidgetView using a smart tag menu. When you create new documents at design time or runtime, custom documents will be created. For demonstration purposes, the example adds a new custom property to the custom Document class. 

Create a custom DocumentManager with a custom View and a custom Document

[ToolboxItem(true)]publicclassCustomDocumentManager:DocumentManager{publicCustomDocumentManager(){}publicCustomDocumentManager(IContainercontainer):base(container){}protectedoverridevoidRegisterViews(){base.RegisterViews();RegisterView<CustomWidgetViewRegistrator>(ViewType.Widget);}publicoverrideBaseViewCreateView(ViewTypetype){if(type==ViewType.Widget)returnnewCustomWidgetView(Container);returnbase.CreateView(type);}}

Documentation

Does This Example Address Your Development Requirements/Objectives?

(you will be redirected to DevExpress.com to submit your response)

About

Create a custom Document Manager for WinForms.

Topics

Resources

Stars

0 stars

Watchers

54 watching

Forks

Used by

Contributors

Languages