public DashboardPage(DashboardViewModel.ScreenTypeEnum screentype, Plan plan = null) { InitializeComponent(); BindingContext = _viewModel = new DashboardViewModel(screentype, plan); _viewModel.SetListViewVisibilityMethod += DelegateListViewMethod; App.AddLog("Loading screen: " + screentype); adView.IsVisible = !App.AppSettings.PremiumBought; }
/// <summary> /// Initializes a new instance of the <see cref="DashboardPage"/> class. /// </summary> /// <param name="screentype">The screentype<see cref="DashboardViewModel.ScreenTypeEnum"/></param> /// <param name="plan">The plan<see cref="Plan"/></param> public DashboardPage(DashboardViewModel.ScreenTypeEnum screentype, Plan plan = null) { InitializeComponent(); BindingContext = _viewModel = new DashboardViewModel(screentype, plan); _viewModel.SetListViewVisibilityMethod += DelegateListViewMethod; App.AddLog("Loading screen: " + screentype); searchIcon.GestureRecognizers.Add(new TapGestureRecognizer { Command = new Command(OnSearchIconTapped) }); searchBar.TextChanged += searchBar_TextChanged; searchBar.Cancelled += (s, e) => OnCancelled(); adView.IsVisible = !App.AppSettings.PremiumBought; }