GraphicsDevice.Clear Method (ClearOptions, Color, Single, Int32)
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Clears resource buffers.
Namespace:  Microsoft.Xna.Framework.Graphics
Assembly:  Microsoft.Xna.Framework.Graphics (in Microsoft.Xna.Framework.Graphics.dll)
Syntax
'Declaration
Public MustOverride Sub Clear ( _
    options As ClearOptions, _
    color As Color, _
    depth As Single, _
    stencil As Integer _
)
public abstract void Clear(
    ClearOptions options,
    Color color,
    float depth,
    int stencil
)
Parameters
- options
 Type: Microsoft.Xna.Framework.Graphics.ClearOptions
 Options for clearing a buffer.
- color
 Type: Microsoft.Xna.Framework.Color
 Set this color value in the buffer.
- depth
 Type: System.Single
 Set this depth value in the buffer.
- stencil
 Type: System.Int32
 Set this stencil value in the buffer.
Version Information
Silverlight
Supported in: 5
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.