Reputation: 1145
I can do that on Grid well with Grid.Children.Add(...)
But I can't figure out how can I add a control to UserControl programmatically.
Upvotes: 1
Views: 2428
Reputation: 1202
In order to use the Children
property, your control has to implement the IPanel
interface. The easiest way to achieve that is to make Panel
a base class for your UserControl
.
Upvotes: 2