简体   繁体   中英

How to load a new layout in C# when a button is pressed?

I want to load a new layout (just like we do in Android programming as layout1.loadLayout()) in C# when a button is pressed?

How can this action take place when a method is called?

If I am not clear in my question, I am looking to load a new set of controls and hiding the current controls temporarily on a window form when a button is clicked (while they should retain their current properties, so that if I go back they should be in the same way where I left them).

How can I jump between different layouts while not completely deleting and creating them again and again?

if this is for a desktop app, look into user controls.

info here

You could create panels to group controls and toggle it's visibility. Look for panel control in components, then add controls to it, toogle it's visibility.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM