Click here to Skip to main content
15,895,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have written a XNA graphics engine which has a very declarative approach to modelling scenes. A scene is put together be creating instances of various objects (Models, Textures, Cameras and the like), setting their properties. In the end you have one big scene object which can be passed on to the engine and can be rendered and animated automatically.

Declaring a scene is not very different from putting together a form in WPF and I asked myself, if I could not put XAML to use to author the scenes. So the question is, if XAML is independent of WPF's components and controls and can be used to declare instances of arbitary objects or not. Please point me in the right direction if you think this can be done.
Posted
Updated 7-Dec-10 1:55am
v2

No. XAML is a layout manager - nothing more.
 
Share this answer
 
Comments
[no name] 7-Dec-10 8:01am    
Thanks. Too bad. I can already serialize a scene to XML, now I must write something that loads the XML and creates the required instances with reflection and assembles the scene.
Pete O'Hanlon 15-Dec-10 16:33pm    
Sorry John, but this is not right. XAML 2009 exists outside of the WPF/SL stack.
#realJSOP 15-Dec-10 17:52pm    
He didn't say what version he was using.
Pete O'Hanlon 16-Dec-10 7:55am    
He didn't need to put the version in. His question was can it be done and the answer is yes, providing he uses XAML 2009.
[no name] 10-Jan-11 7:30am    
Thanks to both of you. I have been on vaction until today and read this just now. I am using .Net 4, so this may be really helpful. Time for a little more reading...
XAML is much more general purpose than needing to be used in WPF/WF or Silverlight. With .NET 4, XAML2009 was introduced (it's in the System.XAML library) and it provides general purpose XAML functionality. Have a look here[^] for more details.
 
Share this answer
 
Comments
[no name] 11-Jan-11 10:07am    
Thanks a lot. Now I have some reading to do.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900