Control the display on another panel

I have two panels on my winform panel: on the first panel I have usercontrolone that can be dynamically multiplied. I want the second panel to display the usercontrolone selected by the user. The idea is that I want to, if I change the text during the execution of mine usercontrol, these changes will be displayed in the second panel. I need an idea how I can do this. I am trying now to create properties for every object of mine usercontroland events, but I think this is too much for this. Thanks.
My code that I have tried so far:

In my usercontrol, I created properties for each object that it contains. Code on usercontrol.cs:

  public string TextName
    {
        get { return textname.Text; }
        set { textname.Text = value; }
    }
    public string Task
    {
        get { return checkboxTip.Text; }
        set { checkboxTip.Text = value; }
    }
       .......
     and on my winform.cs I created an event for all properties:

    private void PropertiesChange_Click(object sender, EventArgs e)
 {
       textname1.Text=textname.Text; //textname1 is the textbox from usercontrol,and                     textname is from the second panel;
      checkboxTip1.Text-checkbox.Text;
    .....// I am doing this for each object,but I have 10 objects. 
+5
source share
1

:

private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{

   textBox2.Text = textBox1.Text;
   // you can do anytihng here
}

, textBox1 1- , textBox2 - .

+1

All Articles