I'm trying to create simple snake game in C# using WPF. I have multiple user controls. In the first user control I have a list of players. You pick a player and click a select button. After you click this button second user control is shown. This user control contains button to start a snake game.
The problem is that all user controls are created when you run the application but command that is bind to button that strat a snake game is created after you click the select button. Now if you click the start a snake game button the command is not executed. My question is: Does the command object has to exist before the user control is created or is there a way to notify the user control that command has been created?