Use the following code to remove all graphics from the panel
panel1.Invalidate();
If there is something you need to add to the initial state of the panel, then after calling invalidate you will have to install these things again.
If the initial state of the panels requires some graphics or data, you can put this in the graphic event of the panel, so every time a cancellation is called, your panel gets the initial state with these elements.
source share