views:

6

answers:

0

Hi Silverlighters. I have problem where I'd like to design a UserControl containing two ContentControls. Imagine the old fashioned explorer that has a treeview on the left and a list on the right. I need the users of my control to be able to add their own controls to each ContentControl - say the left and the right. Unfortunately the ContentProvider only refers to the property Content - which my UserControl only have one of. You can take a look at my simplified example below:

<UserControl.Template> 
    <ControlTemplate TargetType="{x:Type SomeNamespace:MyControl}"> 
        <StackPanel> 
            <ContentPresenter/> 
            <TextBlock Text="{TemplateBinding MyProperty}"/> 
            <ContentPresenter/> 
        </StackPanel> 
    </ControlTemplate> 
</UserControl.Template> 

Anyone having a solution to this? Regards, Nikolaj