You can handle the PrepareRenderCells and SelectionsChanged events to do this. In PrepareRenderCell, if the e.Style is for an edge cell on the selection, then set its border. In SelectionsChanged event, trigger redrawing the cells so the PrepareRenderCells event is raised so the borders can be set.
Here is a sample.
WpfApplication18_38f3042a.zip