The dark purple color that you see is used by XNA and DirectX to indicate an uninitialized buffer. XNA will also clear the buffers for this color to mimic the behavior of an Xbox 360 or Windows Phone, so if you create a game on Windows, it "just works" on those other platforms (or rather, so it doesn't work on the same volume so that you can debug it).
XNA is double buffering. You do not draw directly on the screen, but on the "backbuffer". Only the "front buffer" is displayed on the screen. Each time GraphicsDevice.Present is called ( Game calls it for you in EndDraw ), these two buffers are swapped and what you draw is displayed (and you get a new buffer for drawing).
I'm not sure why XNA notes that the buffer is not initialized when it is replaced. I have not encountered this behavior before - mainly because it is very unusual to want to change the buffers and save their contents.
Usually what you want to do is call Game.SupressDraw when you know that you are not going to change the contents of the screen (saving both the Draw call and the swap). See also the answers here and here .
Keep in mind that cleaning the screen with GraphicsDevice.Clear is very fast. And that XNA does not have the concept of “background” or “foreground” (you always draw on top of what is already in the buffer).
If you have some expensive content that you want to reuse between frames, as a rule, you will draw it into the render target once, and then draw each frame on the screen. But, as always, avoid premature optimization! Graphics cards are designed specifically to redraw scenes in each frame - they are pretty fast!
Andrew Russell
source share