Click or drag to resize
CanvasDevice Class
Devices are used to create graphics resources and drawing sessions. Most apps should use the CanvasControl wrapper instead of directly managing their own CanvasDevice.
Inheritance Hierarchy
SystemObject
  Microsoft.Graphics.CanvasCanvasDevice

Namespace:  Microsoft.Graphics.Canvas
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public sealed class CanvasDevice : IDisposable, 
	ICanvasResourceCreator, IDirect3DDevice

The CanvasDevice type exposes the following members.

Constructors
  NameDescription
Public methodCanvasDevice
Initializes a new instance of the CanvasDevice class.
Public methodCanvasDevice(Boolean)
Initializes a new instance of the CanvasDevice class.
Top
Properties
  NameDescription
Public propertyStatic memberDebugLevel
Gets or sets the debug level for devices when they are created.
Public propertyDevice
Implements the ICanvasResourceCreator interface by returning 'this'.
Public propertyForceSoftwareRenderer
Gets the value of the forceSoftwareRendering parameter that was specified when this device was created.
Public propertyLowPriority
Reduces the priority of drawing work submitted to this device.
Public propertyMaximumBitmapSizeInPixels
Reports the maximum size of bitmaps supported on this device, in pixels.
Public propertyMaximumCacheSize
Sets the maximum amount of memory (in bytes) that can be accumulated for cached images and intermediate surfaces.
Top
Methods
  NameDescription
Public methodStatic memberCreateFromDirect3D11Device
Creates a CanvasDevice that will use the specified IDirect3DDevice.
Public methodDispose
Releases all resources used by the CanvasDevice.
Public methodStatic memberGetSharedDevice
Gets a device that can be shared between multiple different rendering components, such as controls.
Public methodStatic memberGetSharedDevice(Boolean)
Gets a device that can be shared between multiple different rendering components, such as controls.
Public methodIsBufferPrecisionSupported
Checks whether the specified buffer precision is supported on this device.
Public methodIsDeviceLost
Returns whether this device has lost the ability to be operational.
Public methodIsPixelFormatSupported
Checks whether the specified pixel format is supported on this device.
Public methodLock
Locks the device for the current thread.
Public methodRaiseDeviceLost
Raises an event on the device, indicating that it is no longer operational.
Public methodTrim
Trims any graphics memory allocated by the graphics device on the app's behalf.
Top
Events
  NameDescription
Public eventDeviceLost
Subscribe to this event to be notified whenever the device ceases to be operational.
Top
Remarks

When using Direct2D interop, this Win2D class corresponds to the Direct2D interface ID2D1Device1.

See Also