編輯

共用方式為


ITransformProvider.Rotate(Double) Method

Definition

Rotates the control.

public:
 void Rotate(double degrees);
public void Rotate (double degrees);
abstract member Rotate : double -> unit
Public Sub Rotate (degrees As Double)

Parameters

degrees
Double

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

Exceptions

If the CanRotate property is false.

Examples

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.");
}
''' <summary>
''' Rotates the provider the specified number of degrees.
''' </summary>
Private Sub Rotate(ByVal degreesToRotate As Double) Implements ITransformProvider.Rotate
    Throw New InvalidOperationException("Operation cannot be performed.")
End Sub

Remarks

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.

Applies to

See also