activities
latest
false
UiPath logo, featuring letters U and I in white

UI Automation activities

Last updated Mar 13, 2026

SetDeviceOrientation

Changes and then retrieves the orientation of the connected device.

Definition

Namespace: UiPath.MobileAutomation.API.Models

Assembly: UiPath.MobileAutomation.API (in UiPath.MobileAutomation.API.dll)

SetDeviceOrientation(DeviceOrientationEnumC, MobileOptions.SetDeviceOrientationOptions)

ScreenOrientation SetDeviceOrientation(
	    DeviceOrientationEnumC screenOrientationCommand,
	    MobileOptions. SetDeviceOrientationOptions options = null
)
ScreenOrientation SetDeviceOrientation(
	    DeviceOrientationEnumC screenOrientationCommand,
	    MobileOptions. SetDeviceOrientationOptions options = null
)

screenOrientationCommand DeviceOrientationEnumC : Specifies the command for setting the screen orientation. The following options are available:

* `Portrait`
* `Landscape`
* `Toggle`
* `Portrait`
* `Landscape`
* `Toggle`

options MobileOptions.SetDeviceOrientationOptions : Specifies the MobileOptions.SetDeviceOrientationOptions for the SetDeviceOrientation action. Default value is null.

Return value

ScreenOrientation

Returns the new orientation of the device.

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated