1 using Tizen.NUI.BaseComponents;
2 using Tizen.NUI.Components;
4 namespace Tizen.NUI.Samples
6 public class AppBarSample : IExample
8 private Page firstPage, secondPage;
9 private AppBar firstAppBar, secondAppBar;
10 private Button firstActionButton, secondActionButton;
11 private Button firstButton, secondButton;
13 public void Activate()
18 private void CreateFirstPage()
20 firstActionButton = new Button()
23 Size = new Size(72.0f, 72.0f)
25 firstActionButton.Clicked += (object sender, ClickedEventArgs e) =>
30 firstAppBar = new AppBar("First Page", firstActionButton)
32 AutoNavigationContent = false
35 firstButton = new Button()
37 Text = "Click to next",
38 WidthSpecification = LayoutParamPolicies.MatchParent,
39 HeightSpecification = LayoutParamPolicies.MatchParent,
41 firstButton.Clicked += (object sender, ClickedEventArgs e) =>
46 firstPage = new Page(firstAppBar, firstButton);
48 NUIApplication.GetDefaultWindow().GetDefaultNavigator().Push(firstPage);
51 private void CreateSecondPage()
53 secondActionButton = new Button()
56 Size = new Size(72.0f, 72.0f)
58 secondActionButton.Clicked += (object sender, ClickedEventArgs e) =>
60 NUIApplication.GetDefaultWindow().GetDefaultNavigator().Pop();
63 secondAppBar = new AppBar("Second Page", secondActionButton);
65 secondButton = new Button()
67 Text = "Click to prev",
68 WidthSpecification = LayoutParamPolicies.MatchParent,
69 HeightSpecification = LayoutParamPolicies.MatchParent,
71 secondButton.Clicked += (object sender, ClickedEventArgs e) =>
73 NUIApplication.GetDefaultWindow().GetDefaultNavigator().Pop();
76 secondPage = new Page(secondAppBar, secondButton);
78 NUIApplication.GetDefaultWindow().GetDefaultNavigator().Push(secondPage);
81 public void Deactivate()
83 NUIApplication.GetDefaultWindow().GetDefaultNavigator().Remove(secondPage);
87 secondActionButton = null;
90 NUIApplication.GetDefaultWindow().GetDefaultNavigator().Remove(firstPage);
94 firstActionButton = null;