Wednesday, June 06, 2012 2:16 AM
I read here how to add XAML to my DirectX project: http://social.msdn.microsoft.com/Forums/en-US/wingameswithdirectx/thread/436a27a6-5dbe-46f0-9ad1-2934d90033bc but that involves bringing my project files into a new "Blank Application" project. (That could work, but it sounds like a workaround) I'm tempted to use the XAML from the DirectX game sample, but there are all-caps warnings about copyright and "all rights reserved".
What I'd really like to know is there an easier way? Why doesn't the DirectX3D Metro project template include XAML files for me to get started with?
If I have to start building a XAML file from scratch and put a SwapChainBackgroundPanel in it, and connect it to the various pieces of my app, where do I start?
The documentation I've read so far is very good, but doesn't help me start working with these concepts right away in my code, it kind of assumes I already have the files on hand to work with.
Or, look at the question this way: If I was starting a brand new DirectX project, and I intended to use the SwapChainBackgroundPanel from the beginning, how would I get started, other than gutting the sample game and replacing the core of it with my game code?
Thursday, June 07, 2012 7:43 AMModerator
Thanks for your feedback, I will involve more experts to investigate it.
Jesse Jiang [MSFT]
MSDN Community Support | Feedback to us
Thursday, June 07, 2012 4:29 PMThe "Direct2D App (XAML)" template was just modified for the Release Preview to include XAML and use SwapChainBackgroundPanel - this may be a better place to start. It uses both D2D and D3D, and it should be easy to remove the D2D initialization if unneeded.
- Marked As Answer by Matthew Plymale Thursday, June 07, 2012 10:34 PM
Wednesday, June 20, 2012 1:08 PM
The Direct2D App has the SwapChainBackgroundPanel as the root of the Xaml file whereas Simple3DGameXaml has a SwapChainBackgroundPanel contained within a Page element. Simple3DGameXaml is able to use the VisualStateManager to handle transitions of its GUI elements but I can't figure out how to get this working when I start from the Direct2DApp template (as I don't have a Page that I can pass into the GotoState function).
Wednesday, June 20, 2012 7:52 PMAs a workaround for the Release Preview version of the template, you can replace the root element with a Page and make the SwapChainBackgroundPanel a child of the Page.