menu.Post();
};
- var appBar = new AppBar()
- {
- Title = Resources.IDS_WIFI_BODY_WI_FI,
- Actions = new View[] { moreButton, },
- };
-
- AppBarStyle appBarStyle = (AppBarStyle)ThemeManager.GetStyle("Tizen.NUI.Components.AppBar");
- Button backButton = new Button(((AppBarStyle)appBarStyle).BackButton);
-
- backButton.Clicked += (object source, ClickedEventArgs args) =>
- {
- Navigator.Pop();
- };
-
- appBar.NavigationContent = backButton;
-
View mainView = new View()
{
Layout = new LinearLayout()
mainView.Add(mScanList);
mainView.Add(scanButton);
- AppBar = appBar;
Content = mainView;
}
using Tizen.NUI.BaseComponents;\r
using Tizen.NUI.Binding;\r
using Tizen.NUI.Components;\r
-\r
+using static SettingWiFi.Logger;\r
+using SettingWiFi.res.locale;\r
\r
namespace SettingWiFi\r
{\r
{\r
navigator = window.GetDefaultNavigator();\r
mWifi = new WiFi();\r
-\r
+ Bundle mBundle = Bundle.Decode(contentInfo);\r
+ window.BackgroundColor = Color.Transparent;\r
mMainPage = CreateMainPage();\r
+ AppBar appBar = CreateAppBar(Resources.IDS_WIFI_BODY_WI_FI);\r
+ mMainPage.AppBar = appBar;\r
+\r
navigator.Push(mMainPage);\r
}\r
+\r
+ protected virtual AppBar CreateAppBar(string title)\r
+ {\r
+ var appBar = new AppBar()\r
+ {\r
+ Title = title,\r
+ AutoNavigationContent = false,\r
+ };\r
+ var appBarStyle = ThemeManager.GetStyle("Tizen.NUI.Components.AppBar");\r
+ var navigationContent = new Button(((AppBarStyle)appBarStyle).BackButton);\r
+ navigationContent.Clicked += (o, e) =>\r
+ {\r
+ RequestWidgetPop();\r
+ };\r
+\r
+ appBar.NavigationContent = navigationContent;\r
+ return appBar;\r
+ }\r
+\r
+ protected void RequestWidgetPop()\r
+ {\r
+ // Pop Widget Content by sending message\r
+ Bundle nextBundle = new Bundle();\r
+ nextBundle.AddItem("WIDGET_ACTION", "POP");\r
+ String encodedBundle = nextBundle.Encode();\r
+ SetContentInfo(encodedBundle);\r
+ }\r
}\r
}\r