I created my User Control element. I set up and set up elements there, how they should be positioned, stretch. How can I create it programmatically with given parameters (Image, text) during the execution of the application? To add more clarity, this User Control is like a wrapper. I only pass a couple of parameters that are substituted into Image and TextBlock.

  • You can see this answer , I did something similar there. To be more precise, I wrapped the Button in a UserControl with its properties and brought it to the screen by binding to a collection with the properties I needed. - EvgeniyZ
  • Read about dependency properties - Andrew NOP

0