A device idiom categorizes a device by its form factor and typical interaction style: Phone, Tablet, Desktop, TV, Watch, or Unknown. Touch and swipe gestures suit mobile devices, while desktop users commonly expect mouse-based interaction, so a cross-device app may need different UX. section 10.3
Choose an adaptation strategy according to how much the experience must differ:
- Read DeviceInfo.Current.Idiom at runtime, then apply idiom-dependent logic or modify the UI. section 10.3
- Use OnIdiom in XAML to define different views or layouts within one XAML file. section 10.4
- Use compiler directives when the difference is platform-specific or code must not be compiled for another platform. section 10.3
Inventory report across idioms
An inventory report can show only product name and current count on a small Android screen, while exposing more information to desktop users. A ReportViewModel loads inventory through an injected service, and ReportPage initializes it when appearing; the UI can then tailor its layout to each idiom. section 10.3.1 section 10.3
