private void OnInitialized(object sender, EventArgs e) { var mainMenu = (MainMenu)FindName("Main"); var startMenu = (StartMenu)FindName("Start"); var settingsMenu = (SettingsMenu)FindName("Settings"); var model = new MenuDemoModel(mainMenu, startMenu, settingsMenu); mainMenu.DataContext = model; startMenu.DataContext = model; settingsMenu.DataContext = model; mainMenu.FadeIn(); }
public void OnPostInit() #endif { var mainMenu = (MainMenu)FindName("Main"); var startMenu = (StartMenu)FindName("Start"); var settingsMenu = (SettingsMenu)FindName("Settings"); var model = new MenuDemoModel(mainMenu, startMenu, settingsMenu); mainMenu.DataContext = model; startMenu.DataContext = model; settingsMenu.DataContext = model; mainMenu.FadeIn(); }