Hello Michal,
You can remove the port from the Ports collection of the shape. For example: shape.Ports.RemoveChildAt(0);
I hope this helps. Let me know if you have any questions or comments.
Kind regards,
Pavel