This project is read-only.

How can I add a child to a DockableContent?

Jun 25, 2009 at 4:50 PM

How can I do that programmatically?

This works:

public sealed class DockableModule : DockableContent
        public DockableModule()
            UserControl uc = new TestModuleUC();
            Title = "Test Module";

But why can't I do it like that?

 UserControl uc = new TestModuleUC();
 DockableContent dc = new DockableContent();
 dc.Title = module.ModuleName;

The last statement will not work because DocumentContent does not have any method like that, doesn't it?

Jun 27, 2009 at 11:34 PM

It's a content-control with only one "child" so try:

UserControl1 uc = new UserControl1();
DockableContent dc = new DockableContent();
dc.Title = "UserControl";
dc.Content = uc;

Best regards,

Jul 1, 2009 at 9:28 PM

Thanks Juergen,

that was too easy to see it :-)