GraphicsAdapter.QueryRenderTargetFormat Method
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Queries the adapter for support for the requested render target format.
Namespace:  Microsoft.Xna.Framework.Graphics
Assembly:  Microsoft.Xna.Framework.Graphics (in Microsoft.Xna.Framework.Graphics.dll)
Syntax
'Declaration
Public Function QueryRenderTargetFormat ( _
    graphicsProfile As GraphicsProfile, _
    format As SurfaceFormat, _
    depthFormat As DepthFormat, _
    multiSampleCount As Integer, _
    <OutAttribute> ByRef selectedFormat As SurfaceFormat, _
    <OutAttribute> ByRef selectedDepthFormat As DepthFormat, _
    <OutAttribute> ByRef selectedMultiSampleCount As Integer _
) As Boolean
public bool QueryRenderTargetFormat(
    GraphicsProfile graphicsProfile,
    SurfaceFormat format,
    DepthFormat depthFormat,
    int multiSampleCount,
    out SurfaceFormat selectedFormat,
    out DepthFormat selectedDepthFormat,
    out int selectedMultiSampleCount
)
Parameters
- graphicsProfile
 Type: Microsoft.Xna.Framework.Graphics.GraphicsProfile
 The graphics profile.
- format
 Type: Microsoft.Xna.Framework.Graphics.SurfaceFormat
 The requested surface data format.
- depthFormat
 Type: Microsoft.Xna.Framework.Graphics.DepthFormat
 The requested depth buffer format.
- multiSampleCount
 Type: System.Int32
 The requested number of multisampling locations.
- selectedFormat
 Type: Microsoft.Xna.Framework.Graphics.SurfaceFormat%
 The best format the adapter supports for the requested surface data format.
- selectedDepthFormat
 Type: Microsoft.Xna.Framework.Graphics.DepthFormat%
 The best format the adapter supports for the requested depth data format.
- selectedMultiSampleCount
 Type: System.Int32%
 The best format the adapter supports for the requested number of multisampling locations.
Return Value
Type: System.Boolean
true if the adapter supports the requested format; false otherwise.
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.