Sure, using MapGuide Studio, create two new buttons that are an "Invoke Script"
In one, to remove the task pane, put in the following:
javascript:document.all.tags("Frameset").item(1).cols = '*,0';
In the other, to get the task pane back, put in:
javascript:document.all.tags("Frameset").item(1).cols = '*,300';
Add those two Invoke Script buttons to your menu etc, to have a hide Task Pane tool.
Note: This refers to the second Frameset in the root URL of the map (you may have to tweak it a little if you put the URL in another frame).
regards
gordon