protected ThemeableVirtualPathProviderViewEngine()
		{
			this.ViewLocationCache = new TwoLevelViewLocationCache(base.ViewLocationCache);

			// prepare localized mobile & desktop display modes
			DisplayModeProvider.Modes.Clear();
			var mobileDisplayMode = new LocalizedDisplayMode(DisplayModeProvider.MobileDisplayModeId, EnableLocalizedViews)
			{
				ContextCondition = IsMobileDevice
			};
			var desktopDisplayMode = new LocalizedDisplayMode(DisplayModeProvider.DefaultDisplayModeId, EnableLocalizedViews);
			
			DisplayModeProvider.Modes.Add(mobileDisplayMode);
			DisplayModeProvider.Modes.Add(desktopDisplayMode);
		}
Example #2
0
        protected ThemeableVirtualPathProviderViewEngine()
        {
            this.ViewLocationCache = new TwoLevelViewLocationCache(base.ViewLocationCache);

            // prepare localized mobile & desktop display modes
            DisplayModeProvider.Modes.Clear();
            var mobileDisplayMode = new LocalizedDisplayMode(DisplayModeProvider.MobileDisplayModeId, EnableLocalizedViews)
            {
                ContextCondition = IsMobileDevice
            };
            var desktopDisplayMode = new LocalizedDisplayMode(DisplayModeProvider.DefaultDisplayModeId, EnableLocalizedViews);

            DisplayModeProvider.Modes.Add(mobileDisplayMode);
            DisplayModeProvider.Modes.Add(desktopDisplayMode);
        }