Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var page = (Page)Activator.CreateInstance(item.TargetType);
- Label titleViewLabel = new Label
- {
- Text = item.Title,
- FontAttributes = FontAttributes.Bold,
- FontSize = 25,
- TextColor = Color.White,
- BackgroundColor = backgroundColor,
- Margin = 10
- };
- NavigationPage.SetTitleView(page, titleViewLabel);
- private async void ProductView_OnItemSelected(object sender, SelectedItemChangedEventArgs args)
- {
- Product product = (Product)args.SelectedItem;
- ProductDetailPage productDetailPage = new ProductDetailPage
- {
- BindingContext = product,
- Title = product.Name
- };
- await Navigation.PushAsync(productDetailPage);
- }
- protected override void OnAppearing()
- {
- base.OnAppearing();
- Label titleView = ((Label)NavigationPage.GetTitleView(this));
- // titleView.Text has "Products!!
- }
Add Comment
Please, Sign In to add comment