Compartir a través de


UIElement.TransformToVisual Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Returns a transform object that can be used to transform coordinates from the UIElement to the specified object.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)

Syntax

'Declaration
Public Function TransformToVisual ( _
    visual As UIElement _
) As GeneralTransform
public GeneralTransform TransformToVisual(
    UIElement visual
)

Parameters

  • visual
    Type: System.Windows.UIElement
    The object to compare to the current object for purposes of obtaining the transform.

Return Value

Type: System.Windows.Media.GeneralTransform
The transform information as an object. Call GeneralTransform.Transform on this object to get a practical transform.

Remarks

In WPF, this method exists on the Visual class. Silverlight does not use Visual in its public object model. Silverlight implements several Visual-related APIs on the UIElement class instead.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.