Check for Tablet in .NET Maui

Fritz Switzer 261 Reputation points
2024-05-25T01:08:28.11+00:00

In my .NET Maui application , I can check for Android or Windows and create View based on that check, however, I want to create views for Tablets that are different than Android Phone.

Here is my check so far.

 public partial class App : Application
    {
        public App()
        {
            InitializeComponent();
#if ANDROID || IOS
            MainPage = new NavigationPage(new MobileStartPage());
#else
            MainPage=new NavigationPage(new DesktopStartPage());
#endif
        }
    }

How can I check for a Tablet?


.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,044 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,462 questions
0 comments No comments
{count} votes

0 additional answers

Sort by: Most helpful