GraphicsDeviceExtensions.SetSharingMode Method
Enables or disables sharing a graphics device between Silverlight and XNA.
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Sub SetSharingMode ( _
device As GraphicsDevice, _
enabled As Boolean _
)
[ExtensionAttribute]
public static void SetSharingMode (
GraphicsDevice device,
bool enabled
)
[ExtensionAttribute]
public:
static void SetSharingMode(
GraphicsDevice device,
bool enabled
)
Parameters
- device
Type: GraphicsDevice
The graphics device to share. - enabled
Type: Boolean
Set to true to enable, and false to disable XNA rendering within a Silverlight application. XNA rendering is disabled by default for Silverlight applications.
Remarks
SetSharingMode should be set to true before attempting to render with XNA, and should be set to false when rendering is completed, returning control of the graphics device to Silverlight.
Requirements
Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)
See Also
Tasks
Adding XNA Rendering to a Silverlight Application on Windows Phone
Reference
GraphicsDeviceExtensions Class
GraphicsDeviceExtensions Members
Microsoft.Xna.Framework.Graphics Namespace
Platforms
Windows Phone