Is there a way to share a button with multiple pages in a C# Windows Forms Application; so that the button will be available in two or more pages?
I tried:
this.Page1.Controls.Add(this.Button1);
this.Page2.Controls.Add(this.Button1);
But it does not work for me and the button Button1 is still available only in Page1.
No you cannot share it, each control belongs to a single parent and cannot be shared between multiple parents. You can use either of the following options:
Use a single button but in tab selection change, move it to another tab page:
Use different buttons in each tab page but share the same event handler
Put it over the tab control, not inside the pages (pay attention to document outline):