I've created a user control (in vb.net code) that contains two dock panels, one for header content (called HeaderDockPanel) and one for other content (called RootDockPanel). The dockPanels are depedency properties of the user control.
These dependency properties are declared as follows:
Public Shared ReadOnly RootDockPanelProperty As DependencyProperty = DependencyProperty.Register( _
"RootDockPanel", GetType(DockPanel), GetType(MyUserControl), New PropertyMetadata( _
Nothing))
Public Shared ReadOnly HeaderDockPanelProperty As DependencyProperty = DependencyProperty.Register( _
"HeaderDockPanel", GetType(DockPanel), GetType(MyUserControl), New PropertyMetadata( _
Nothing))
I've tried to change the content of these dock panels as follows but I've had no sucess:
<Wpf:EditBaseControl>
<Wpf:MyUserControl.HeaderDockPanel>
<DockPanel>
<Button Content="buttonContent" />
<TextBlock Text="textBlock" />
</DockPanel>
</Wpf:MyUserControl.HeaderDockPanel>
</Wpf:EditBaseControl>
How do I edit the contents of a DockPanel that's inside a UserControl?