/// <summary> /// Initialises a new instance of the MainWindow class, and prepares it for display. /// </summary> public MainWindow() { InitializeComponent(); Pages.RegisterAll(); this.ChangeScreen(PageRegistry.GetDefaultPage()); App.Settings["MainWindow"] = this; PlayerControls = Player; }
/// <summary> /// Registers all the UI views with the PageRegistry. /// </summary> public static void RegisterAll() { PageRegistry.Register(new AppPage("HomeScreen", new HomeScreen(), true)); }
/// <summary> /// Changes the view to another page. /// </summary> /// <param name="name">The name of the view to change to.</param> public void ChangeScreen(string name) { this.ChangeScreen(PageRegistry.GetPage(name)); }