Good evening. How can I dynamically add controls ( TextBox'ы ) to TextBox'ы ? For example, there are two objects Line Circle
public class Line:IObjects { private string _nameObject; public Point StartPoint(){get;set;} public Point EndPoint(){get;set;} public string NameObject{{return "Line";}{_nameObject = value;}} } public class Circle:IObjects { private string _nameObject; public Point CenterPoint(){get;set;} public string NameObject{{return "Line";}{_nameObject = value;}} } interface IObject { string NameObject{get;set;} } When I receive interface objects in View, I need to display the coordinate parameters, since in Line , two parameters are used, and in Circle one determines how many TextBox'ов need to be displayed to change the parameters of each object. Creating pre- TextBox'ы in UC not logical, because if necessary we should be able to create the required number of elements depending on the edited object.

ViewModeltransfer the data to theView, but they need to be correctly reflected, that is, there are several options (coordinates come, for example, the coordinates of the line (coordinates of the beginning and end of the line) and the circle (coordinates of the center)), but it’s not nice to do twoTextBoxfor the circle, option to change the visibility the same is not suitable not productively, suddenly it will be necessary to add the polyhedron n-face. - KJfeObservableCollection,INotifyPropertyChanged,ItemsControlwithItemsControl.ItemTemplate. The first pair of links in Google is enough. Essentially: 1) to link both of your classes in the new LineAndCircle class. 2) Create anObservableCollection<LineAndCircle>. 3) In the interface, create anItemControlwith theItemTemplateyouItemTemplate. 4) Bind theItemSourceyourItemControlto anObservableCollection<LineAndCircle>- John