Dynamic backgrounds


image

update : Demo code works for Release Preview (RP)

Don’t be afraid to create crazy backgrounds for your managed metro apps. This is a quick post on how to do just that using some of the techniques I’ve been posting about.

For this post ill stay simple BUT the next post I promise to go crazy with the colors, textures, geometries and especially the animations Smile

 

Idea

The idea is simple, you have your DirectX layer underneath your XAML layer and you render dynamic things on the Dx layer. These dynamic things for this demo are simple geometries, colors and radial gradients.

image

 

Demo screen shots

This is a plain white background with a radial gradient painted ontop of it using D2D (via SharpDx) and the Tiles are rendered on the XAML layer above the D2D layer.

image

Press on the blue tile

image

Press on the Red tile

image

Press on the Green tile

image

Press the Orange tile

image

 

Demo video

 

Demo code

image

UPDATED : Now works for Release Preview

Conclusion

Don’t be afraid to give your managed metro apps some crazy DirectX rendered backgrounds, think outside of the box and experiment. These are after all consumer apps that need to wow the user.

SharpDx gives us some great tools to do crazy things, I hope to show you some of these crazy things in my next post!

12 responses to “Dynamic backgrounds

  1. Pingback: Dynamic backgrounds | Silverlight and other cool things …

  2. Pingback: Windows 8 Developer Links – 2012-05-29 | Dan Rigby

  3. Pingback: SilverlightCream Top 5 News for Week May 28 - June 3, 2012

  4. Pingback: Dynamic backgrounds :: Learning

  5. Thanks for this great series of posts! But I am eagerly waiting for an update that works with the latest release preview since right now I am getting tons of errors and didn’t manage to get it to compile yet.

  6. Pingback: All my XAML/C#/SharpDx demos | Silverlight and other cool things …

  7. Any issues if I use this on production code? i.e. Is there a license attached?

  8. I have just tried running your sample, and the background renders correctly, but pretty much instantly disappears back to a plain background. Any idea what could be causing this?

  9. hgcynreg dtjwysip fheerjie imtsajqvbvi kfzdsmk kfwihow cgiatkg zrxshmizfto

Leave a comment