private void CreateSecondPage() { secondActionButton = new Button() { Text = "Page 1", }; secondActionButton.Clicked += (object sender, ClickedEventArgs e) => { NUIApplication.GetDefaultWindow().GetDefaultNavigator().Pop(); }; secondAppBar = new AppBar(); secondAppBar.SetTitle("Second Page"); secondAppBar.AddActions(secondActionButton); secondButton = new Button() { Text = "Click to prev", WidthSpecification = LayoutParamPolicies.MatchParent, HeightSpecification = LayoutParamPolicies.MatchParent, }; secondButton.Clicked += (object sender, ClickedEventArgs e) => { NUIApplication.GetDefaultWindow().GetDefaultNavigator().Pop(); }; secondPage = new Page(secondAppBar, secondButton); NUIApplication.GetDefaultWindow().GetDefaultNavigator().Push(secondPage); }
private void CreateFirstPage() { firstActionButton = new Button() { Text = "Page 2", }; firstActionButton.Clicked += (object sender, ClickedEventArgs e) => { CreateSecondPage(); }; firstAppBar = new AppBar() { AutoNavigationContent = false }; firstAppBar.SetTitle("First Page"); firstAppBar.AddActions(firstActionButton); firstButton = new Button() { Text = "Click to next", WidthSpecification = LayoutParamPolicies.MatchParent, HeightSpecification = LayoutParamPolicies.MatchParent, }; firstButton.Clicked += (object sender, ClickedEventArgs e) => { CreateSecondPage(); }; firstPage = new Page(firstAppBar, firstButton); NUIApplication.GetDefaultWindow().GetDefaultNavigator().Push(firstPage); }