Esempio n. 1
0
        public MenuListingViewModel(GalaSoft.MvvmLight.Views.INavigationService navigationService)
        {
            _navigationService = navigationService ?? throw new ArgumentNullException("navigationService");
            var vmlocator = (ViewModelLocator)App.Current.Resources["Locator"];

            MenuItems = vmlocator.MainVM.MenuItems;

            //design elements for XAML view
            if (IsInDesignMode)
            {
                MenuItems = new ObservableCollection <Model.MenuItem>
                {
                    new Model.MenuItem()
                    {
                        Image = "https://bluewater.co.uk/sites/bluewater/files/styles/image_spotlight_large/public/images/spotlights/burger-cropped.jpg", Title = "Item 1", Content = ""
                    },
                    new Model.MenuItem()
                    {
                        Image = "https://image.shutterstock.com/display_pic_with_logo/136306/722718082/stock-photo-healthy-food-clean-eating-selection-fruit-vegetable-seeds-superfood-cereals-leaf-vegetable-on-722718082.jpg", Title = "Item 2", Content = ""
                    },
                    new Model.MenuItem()
                    {
                        Image = "https://dynaimage.cdn.cnn.com/cnn/q_auto,w_602,c_fill,g_auto,h_339,ar_16:9/http%3A%2F%2Fcdn.cnn.com%2Fcnnnext%2Fdam%2Fassets%2F170302153529-garlic-crab.jpg", Title = "Item 3", Content = ""
                    },
                    new Model.MenuItem()
                    {
                        Image = "https://www.google.com/imgres?imgurl=https%3A%2F%2Fmedia1.popsugar-assets.com%2Ffiles%2Fthumbor%2FD0OYajmdcatHUC1-b4Axbf-uNxo%2Ffit-in%2F2048xorig%2Ffilters%3Aformat_auto-!!-%3Astrip_icc-!!-%2F2017%2F02%2F08%2F859%2Fn%2F1922195%2Fa7a42800589b73af54eda9.99423697_edit_img_image_43136859_1486581354%2Fi%2FKFC-Fried-Chicken-Pizza.jpg&imgrefurl=https%3A%2F%2Fwww.popsugar.com%2Flatest%2FFried-Chicken&docid=YKKBm1HG99tGJM&tbnid=QmIaQIR7UdyMhM%3A&vet=10ahUKEwijq9fymdTcAhVGxxoKHchtCUgQMwiHAigQMBA..i&w=1440&h=1440&bih=823&biw=1034&q=food&ved=0ahUKEwijq9fymdTcAhVGxxoKHchtCUgQMwiHAigQMBA&iact=mrc&uact=8", Title = "Item 4", Content = ""
                    },
                    new Model.MenuItem()
                    {
                        Image = "https://cdn.cnn.com/cnnnext/dam/assets/171027052520-processed-foods-exlarge-tease.jpg", Title = "Item 5", Content = ""
                    },
                };
            }
        }
        public FrontPageViewModel(GalaSoft.MvvmLight.Views.INavigationService nav)
        {
            navigationService = nav;
            if (!DesignMode.DesignModeEnabled)
                Init();
            else
                InitDesignTime();

        }
 public FrontPageViewModel(GalaSoft.MvvmLight.Views.INavigationService nav)
 {
     navigationService = nav;
     if (!DesignMode.DesignModeEnabled)
     {
         Init();
     }
     else
     {
         InitDesignTime();
     }
 }
Esempio n. 4
0
        public LoginViewModel(
            IAuthenticationService authenticationService, GalaSoft.MvvmLight.Views.INavigationService navigationService, Dialog.IDialogService dialogService)
        {
            _authenticationService = authenticationService;
            _navigationService     = navigationService;
            _dialogService         = dialogService;

            _userName = new ValidatableObject <string>();
            _password = new ValidatableObject <string>();

            AddValidations();
        }
Esempio n. 5
0
 public UploadsViewModel(GalaSoft.MvvmLight.Views.INavigationService nav) : base(nav, DesignMode.DesignModeEnabled)
 {
 }
Esempio n. 6
0
 private void InitDesignTime(GalaSoft.MvvmLight.Views.INavigationService nav)
 {
     //DownloadsVM = new DownloadsViewModel();
     //UploadsVM = new UploadsViewModel(nav);
 }
Esempio n. 7
0
 public TransfersPageViewModel(GalaSoft.MvvmLight.Views.INavigationService nav) : base(new DownloadsViewModel(), new UploadsViewModel(nav))
 {
 }
Esempio n. 8
0
 public SplashPageViewModel(GalaSoft.MvvmLight.Views.INavigationService nav) : base(nav)
 {
 }
 public SearchViewModel(SubredditsViewModel subredditsVM, GalaSoft.MvvmLight.Views.INavigationService nav) : base(subredditsVM, nav, DesignMode.DesignModeEnabled)
 {
 }