question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Device Idiom detects Windows as tablet

See original GitHub issue

Description

Using DeviceInfo or the OnIdiom markup extension detects Windows as tablet. I’ve seen these: https://github.com/dotnet/maui/issues/4351 https://github.com/dotnet/maui/issues/2423 https://github.com/dotnet/maui/issues/5769

But the issue still occurs. See: image

Steps to Reproduce

  1. Create a new .NET MAUI app
  2. Use DeviceInfo.Current.Idiom or the OnIdiom markup extension
  3. Run on Windows
  4. Observe that the detected idiom is tablet

Link to public reproduction project repository

https://github.com/matt-goldman/OnIdiomBug.App

Version with bug

6.0.486 (current)

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

Windows 10.0.19041.0

Did you find any workaround?

Workaround is to use Tablet for the views you want on Windows.

Relevant log output

No response

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Reactions:1
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
jfversluiscommented, Nov 7, 2022

Amazing work @matt-goldman thanks for the help and investigation here!

2reactions
matt-goldmancommented, Nov 6, 2022

Update: I did this initially on my laptop, which has a touch screen. Ran it again on my desktop (which doesn’t have a touch screen) and got the expected result:

image

So I’m guessing you’re using the presence of a touch screen to distinguish between desktop and tablet.

If this is intentional (i.e., if you consider a Windows computer with a touchscreen to be a ‘tablet’), then I think the documentation should reflect this. But I also don’t think this is the right approach; while it may be useful to distinguish between touch and non-touch devices, I don’t think the device idiom is where developers expect this to be distinguished.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Customize UI appearance based on the platform and ...
Customize UI appearance based on the platform and device idiom ... Your app can detect which capabilities are available and enable controls ...
Read more >
Device information - .NET MAUI
Idiom property represents the type of device the app is running on, such as a desktop computer or a tablet. The DeviceIdiom type...
Read more >
Unknown devices shows connected on network map in ...
I would like to understand why/how the device shows up in the Network ... Only the main computer will be able to detect...
Read more >
Manage Device Installation with Group Policy
To install a driver, Windows detects the device, recognizes its type, and then finds the driver that matches that type.
Read more >
High Definition Audio Device Has a Driver Problem ... - YouTube
The high definition audio has a driver error occurs when Windows fails to detect necessary audio drivers for the audio device.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found