1

Closed

Mobile display mode by default?

description

Could you let me know why Mobile display mode is by default in DisplayModes? I would like to handle my self how application should be treated. E.g. Some devices are expluded from mobile with default mobile display mode, that is why I'm using my own recognition if something is mobile or not. Now I need to make hack (change mobile to e.g. small to prevent use default mobile display mode, because default is just not working properly. So why it is there by defult? It is also causing troubles is I want to have swithc in my application to switch to normal mode.
Closed Jun 5 at 9:23 PM by eilonlipton
Hi,

The DisplayModes feature just has a default "Mobile" display mode because it is a very common scenario, and also the motivation for having this feature. There are some cool blog posts that show how to create custom display modes to handle different scenarios. And you can remove the default "Mobile" display mode if it doesn't handle the scenario that you have. Here's one blog post I found:
http://weblogs.asp.net/gunnarpeipman/archive/2011/09/18/asp-net-mvc-4-display-modes.aspx

comments