It might be an issue with where the rotation is being applied.
There is two properties on a RotateTransform (CenterX, CenterY) that determines the point at which to rotate around.
I quote from MSDN
The CenterX and CenterY properties of the RotateTransform specify the point about which the object is rotated. This center point is expressed in the coordinate space of the element that is transformed. By default, the rotation is applied to (0,0), which is the upper-left corner of the object to transform.
The next example rotates a Polyline object clockwise 45 degrees about the point (25,50).
It's possible that it's rotating around the top left of your object, and if thats the set to the top left of the underlying canvas, then it will rotate outside of your canvas space.
Hope this helps