MAUI Settings

This service is used to provide MAUI Essentials functionality to those using the trellispark MAUI application. Specifically the IDeviceInfo and IDeviceDisplay interfaces are used which allow the ability to capture the device type running the MAUI application and the device orientation.

This service is registered as a singleton service in the website and hybrid projects.

All methods in this service will return a string with the requested information.

This service implements the IGI_Settings interface and it’s reference name is MAUISettings. Key properties and methods this service provides are the following:

  • event Action<string> OrientationChanged – An event that if fired any time the device orientation change, the returned string will indicate the orientation (Landscape/Portait).
  • string GetDeviceIdiom() – When called will return a string indicating the current device type being used (Desktop, Phone, Tablet, Web).
  • string GetDeviceOrientation() – When called this method will get and return the devices current orientation.
Updated on March 25, 2024

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support

Leave a Comment