public ThemePageView() { NavigationPage.SetHasNavigationBar(this, false); BackgroundColor = Color.FromHex(Theme.Current.AppBackgroundColor); BindingContext = new ThemePageViewModel(new PlatformServices()); createViews(); }
protected override void OnNavigatedTo(NavigationEventArgs e) { // if (e.NavigationMode == NavigationMode.New) { string id = e.Parameter.ToString(); themeId = id; tvw = new ThemePageViewModel(id); this.DataContext = tvw; } //register message this.btn_LightModeSwitch.DataContext = AppSettings.Instance; Messenger.Default.Register <NotificationMessage>(this, (msg) => { switch (msg.Notification) { case "OnItemClick": Frame.Navigate(typeof(NewsContentPage), msg.Sender); break; default: break; } }); }