You're not really creating a new panel.
What you're doing is creating a new pointer for a Panel called
NewPanel
And yes, for a second you're creating a new Panel and assigning it to the pointer. But then you immediately change the pointer for the new panel to point to the old one.
So
NewPanel == Panel1
This isn't creating a copy. Objects such as Panels exist in the
Stack
area of memory.
This mean that
NewPanel = Panel1
isn't creating a copy. It's just changing NewPanel so it points to the same memory location as Panel1. NewPanel and Panel1 are the same Panel instance.
To create a copy of the panel you'll have to create a new panel and then configure it using your code. So instead of
NewPanel = Panel1
you'd have something similar to this:
NewPanel.Left = Panel1.Left
NewPanel.Top = Panel1.Top
Adding all the properties you need to configure the new panel as the old one was.
You then need to do a similar thing for the all the controls within the panel.
Truth be told, that's a lot of hard work. I'd create a custom control which contains a Panel and all the controls contained within the Panel. Then you need only create a new instance of your custom control.
The following is an introduction to developing custom controls.
http://msdn.microsoft.com/en-us/library/6hws6h2t.aspx[
^]