In-situ structural transformation of shape-controlled nanocrystals