I have UserControl1, and I want to instantiate it and set the attached property for it in the code located behind another UserControl2. In other words, in my UserControl2:
<UserControl2>
<Canvas>
</Canvas>
</UserControl2>
And I want to do:
<UserControl2>
<Canvas>
<UserControl1 Canvas.Left="100" ... />
</Canvas>
</UserControl2>
How can I create UserControl1 with an attached property in the code behind UserControl2 ?
source
share