ITransformProvider.Rotate Method (Double)

 

Rotates the control.

Namespace:   System.Windows.Automation.Provider
Assembly:  UIAutomationProvider (in UIAutomationProvider.dll)

void Rotate(
	double degrees
)

Parameters

degrees
Type: System.Double

The number of degrees to rotate the control. A positive number rotates clockwise; a negative number rotates counterclockwise.

Exception Condition
InvalidOperationException

If the CanRotate property is false.

An object cannot be moved, resized or rotated such that its resulting screen location would be completely outside the coordinates of its container and inaccessible to keyboard or mouse. For example, when a top-level window is moved completely off-screen or a child object is moved outside the boundaries of the container's viewport. In these cases the object is placed as close to the requested screen coordinates as possible with the top or left coordinates overridden to be within the container boundaries.

The following example shows one possible implementation of this method for a custom control that cannot be rotated.

/// <summary>
/// Rotates the provider the specified number of degrees.
/// </summary>
void ITransformProvider.Rotate(double degreesToRotate)
{
    throw new InvalidOperationException("Operation cannot be performed.");
}

.NET Framework
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: