Skip to content

DevExpress-Examples/winforms-create-custom-document-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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)]
public class CustomDocumentManager : DocumentManager {
    public CustomDocumentManager() { }
    public CustomDocumentManager(IContainer container)
        : base(container) {

    }
    protected override void RegisterViews() {
        base.RegisterViews();
        RegisterView<CustomWidgetViewRegistrator>(ViewType.Widget);
    }
    public override BaseView CreateView(ViewType type) {
        if (type == ViewType.Widget) return new CustomWidgetView(Container);
        return base.CreateView(type);
    }
}

Documentation

Does this example address your development requirements/objectives?

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

Contributors 5

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy