I am a beginner in programming macos. How can you replace the whole part of the window after clicking the button, eg Box or CustomView. Can I ask for an example?
Welcome to Xamarin.Mac. I would suggest reading some of the resources listed here:
In general, to replace part of a window you RemoveFromSuperview the subtree of view elements and add the new ones to the ContentView of your window.
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies