ScreenManagement how do I had different controls?
        Posted  
        
            by 
                DiasFrancisco
            
        on Game Development
        
        See other posts from Game Development
        
            or by DiasFrancisco
        
        
        
        Published on 2013-10-29T13:11:44Z
        Indexed on 
            2013/10/29
            16:14 UTC
        
        
        Read the original article
        Hit count: 375
        
I saw a question here using DataTemplates with WPF for ScreenManagement, I was curious and I gave it a try I think the ideia is amazing and very clean. Though I'm new to WPF and I read a lot of times that almost everything should be made in XAML and very little should be "coded behind".
My questions resolves about using the datatemplate ideia, WHERE should the code that calls the transitions be? where should I define which commands are avaiable in which screens. For example:
[ScreenA] Commands: Pressing B - Goes to state B Pressing ESC - Exits
[ScreenB] Commands: Pressing A - Goes to state A Pressing SPACE - Exits
where do I define the keyEventHandlers? and where do I call the next screen? I'm doing this as an hobby for learning and "if you are learning, better learn it right" :) Thank you for your time.
© Game Development or respective owner