Exemple #1
0
        public ActionResult Index(IContent currentContent)
        {
            var startPage = _loader.Get <StartPage>(ContentReference.StartPage);
            var model     = new PreviewPageViewModel(startPage, currentContent);

            return(View(model));
        }
Exemple #2
0
        public ActionResult Index(IContent currentContent)
        {
            var loader    = ServiceLocator.Current.GetInstance <EPiServer.IContentLoader>();
            var startPage = loader.Get <SitePageData>(ContentReference.StartPage);
            var viewmodel = new PreviewPageViewModel(startPage, currentContent);

            return(View(viewmodel));
        }
Exemple #3
0
 public PreviewPage(int id, string name, Models.ImageSource imageSource, int price, string longDescription, CategoryName categoryName, string description)
 {
     InitializeComponent();
     BindingContext = new PreviewPageViewModel(id, name, imageSource, price, longDescription, categoryName, description);
 }
 public PreviewPageViewModelTests()
 {
     Services  = new MockAppServiceProvider();
     ViewModel = new PreviewPageViewModel(Services);
 }
 public PreviewPage()
 {
     InitializeComponent();
     BindingContext = new PreviewPageViewModel(AppServiceProvider.Instance);
 }