I have created a UserControl and I want to expose the ItemsSource of the ItemsControl which is used in the UserControl. But I want to expose the Items through a separate property, like this:
<MyUserControl>
<MyProperty>
<Button>Button 1</Button>
<Button>Button 2</Button>
</MyProperty>
</MyUserControl>
The reason for the separation by property is because I need to create multiple properties like this. I tried creating a Dependency Property in different ways, but I am not able to get it to work as I want. Without the separate property I am able to make it work.
I found some clues in the following topic, but the solution does not use a separate property: How to create WPF usercontrol which contains placeholders for later usage
Any help is appreciated.