is closed (by clicking the close button for example) actually its IsHidden
property is set to "True", in order to made it visible again when needed. So, you could close a pane pragmatically in code behind by just setting the IsHidden
property to "True". However, if you'd like to close it permanently you could use the RemoveFromParent
method. For your concrete scenario with the Button you need to pass the Pane you need to close as a CommandParameter.
Please, check the following article from our help documentation that provides more detailed information about the closing of the Panes:
You could also check that
sample project from our SDK Repository that demonstrates how to permanently close a Pane using the RemoveFromParent
Hopes this helps.