Skybound Rebar

ControlRenderer.RtlTranslate Method (Rectangle)

Translates a rectangle within the bounds of the current renderer to support right-to-left layouts.

[Visual Basic]
Overloads Public Function RtlTranslate( _
   ByVal r As Rectangle _
) As Rectangle
[C#]
public Rectangle RtlTranslate(
   Rectangle r
);

Parameters

r
The rectangle to translate.

Return Value

A Rectangle structure that is translated within the bounds of the control.

Remarks

When RightToLeft is false, this method simply returns the rectangle specified in r. Otherwise, the rectangle is flipped across the y-axis at the center point of the control's bounds. This is useful for supporting right-to-left layouts.

The distance between the left edge of Bounds and the left edge of the input rectangle is equal to the distance between the right edge of Bounds and the right edge of the output rectangle. As an example, if the bounds of the control are (50, 50)-(100, 100) and r is (60, 60)-(70, 70), this method would return a rectangle (80, 60)-(90, 70).

See Also

ControlRenderer Class | Skybound.Rebar.Rendering Namespace | ControlRenderer.RtlTranslate Overload List