Win2D 0.0.21 – controls share devices, better device creation options, CanvasAnimatedControl improvements, and improved docs

Win2D version 0.0.21 is now available on NuGet and GitHub


Breaking changes

  • The CanvasAnimatedControl.Input property is replaced by a CreateCoreIndependentInputSource method.  This means that apps can now use whatever input policy they want.  The standard XAML pointer events now work.  Or an input source can be created on the game loop thread.  Or one could be created on some other thread.  See the Custom Fonts example for code.
  • Debug level is now configured through a static CanvasDevice.DebugLevel property, rather than a CanvasDevice constructor parameter.  This makes it easier to globally turn on debugging for an entire app, including devices created indirectly by CanvasControl or CanvasAnimatedControl.


What’s new

  • CanvasControl and CanvasAnimatedControl now have the ability to share a single CanvasDevice across multiple controls.  This saves memory for apps that use more than one Win2D control at a time, and makes it possible to share graphics resources such as bitmaps across these controls.  By default, CanvasControl devices are shared, while CanvasAnimatedControl devices are not.  You can change this by setting the UseSharedDevice property.
  • Added a CustomDevice property to CanvasControl and CanvasAnimatedControl.  This tells the Win2D controls use an arbitrary device of your choosing, in case you need unusual device creation options or to customize the device sharing behavior.
  • CanvasAnimatedControl now stops the dispatcher from running while the UI thread owns the device.  This ensures that input events and RunOnGameLoopThreadAsync actions only execute after CreateResources has completed.


Where next?

We are getting close to a V1 release of Win2D.  As part of this process, we recently spent some time updating our backlog, removing stale items and reprioritizing everything.  The backlog now shows exactly what work we intend to finish before declaring V1, and at least a good approximation of what order we’ll do things in after that.


Comments (2)

  1. Cookie Monster says:

    Can Universal Windows apps be launched on Windows start up? Can Universal Windows apps serve as a shell replacement?

  2. Andy says:

    Great News. And the backlog sounds great to. I for myself hope to see sprites and spritesheets soon – like cocos or sparrow are handling texturepacker sheets.

Skip to main content