I don't think you're wanting to manipulate the viewport, that isn't going to achieve what sounds like scrolling. The way that's done is by putting a camera through another viewport, and having that viewport attached to a viewport sprite, that will render it's texture as what is seen in that secondary viewport. However, doing that is going to leave you with empty border regions, since the rest of the canvas will still be displayed.
I'm guessing you're talking about clamping the camera to the edges of the map as you scroll through. The Camera2D provides clamping functionality through the Limit property. It gives you a Left, Right, Top, and Bottom edge. Set those to the margins of your level as it is on the canvas, and that should keep the camera inside the world.