If there is no Handle, the port gets the bounds of the Label. If there is no Label, the port is positioned at the top left corner, inside the margin. If you override this, you should be sure to position the port within the bounds of the subgraph.
Example
For example, if you want the port's Bounds to be the same as the bordered area,
override this method as follows:
For more examples, see the classes in the SubGraphApp sample.