Exemple #1
0
        public BaseViewModel()
        {
            RefreshCommandPush = new Command(async() => await ExecuteRefreshCommand());

            var masterBinding = Application.Current.MainPage as MainPage;

            if (masterBinding != null)
            {
                HubService = masterBinding.HubServiceMain;
            }
        }
 public MainPage()
 {
     InitializeComponent();
     MasterBehavior = MasterBehavior.Popover;
     HubServiceMain = new HubServiceApi();
     Master         = new MenuPage()
     {
         BindingContext = new MenuViewModel()
     };
     Detail = new NavigationPage(new MoviesPage()
     {
         BindingContext = new MoviesViewModel()
         {
             HubService = HubServiceMain
         }
     })
     {
         BarBackgroundColor = Color.FromHex("#252525")
     };
 }