This project is read-only.

How can I add DocumentContent by code as a plugin?

Jun 25, 2009 at 12:57 AM
Edited Jun 25, 2009 at 1:28 AM


I have the following code:


                  <ad:DocumentPane x:Name="pluginHost">
                        <ad:DocumentContent Title="Plugin 1">
                        </ad:DocumentContent >
                        <ad:DocumentContent Title="Plugin 2">
                        </ad:DocumentContent >


Now I want to add another DocumentContent by code but I did not find a Method like pluginHost.AddChild(dc) and with pluginHost.Items.Add(dc) I get an InvalidOperationException.

May it be a problem with the parent user control?

<UserControl x:Class="TestModule.TestModuleUC"
    Height="300" Width="300">
    <ad:DockableContent Name="TestModuleDC" Title="Test Modul">
            <Label Content="Test Module"/>
    </ad:DockableContent >

Because I say

UserControl uc = new TestModuleUC;

DocableContent dc =uc.TestModuleDC;

Any idea?

Thanks in advance