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

UI Automation activities

Last updated Feb 19, 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?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo
Trust and Security
© 2005-2026 UiPath. All rights reserved.