Click or drag to resize

PresentationFrameworkExtensionsTranslate Method (Rect, Visual, Visual)

Translates the coordinates of the specified rectangle from the first visual to the second visual.

Namespace:  TomsToolbox.Wpf
Assembly:  TomsToolbox.Wpf (in TomsToolbox.Wpf.dll)
Syntax
public static Rect Translate(
	this Rect rect,
	Visual from,
	Visual to
)

Parameters

rect
Type: System.WindowsRect
The rectangle.
from
Type: System.Windows.MediaVisual
The visual for which the rectangle coordinates are specified.
to
Type: System.Windows.MediaVisual
The visual to which the rectangle coordinates are translated.

Return Value

Type: Rect
The translated rectangle

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Rect. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also