The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

GraphicsDeviceExtensions.SetSharingMode Method

This method is available only when developing for Windows Phone.
Enables or disables sharing a graphics device between Silverlight and XNA.

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework.Interop (in microsoft.xna.framework.interop.dll)

public static void SetSharingMode (
         GraphicsDevice device,
         bool enabled


Type: GraphicsDevice
The graphics device to share.
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.

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.

Windows Phone

Community Additions

© 2014 Microsoft