ComponentOne Basic Library for WPF and Silverlight
C1TransformToVisual Method (Extensions)


C1.WPF Namespace > Extensions Class : C1TransformToVisual Method
The System.Windows.UIElement that defines the source coordinates.
The System.Windows.UIElement that defines the target coordinates.
Returns a transform object that can be used to transform coordinates from the System.Windows.UIElement to the specified object.
Syntax
'Declaration
 
<System.Runtime.CompilerServices.ExtensionAttribute()>
Public Shared Function C1TransformToVisual( _
   ByVal element As System.Windows.UIElement, _
   ByVal visual As System.Windows.UIElement _
) As System.Windows.Media.GeneralTransform
'Usage
 
Dim element As System.Windows.UIElement
Dim visual As System.Windows.UIElement
Dim value As System.Windows.Media.GeneralTransform
 
value = Extensions.C1TransformToVisual(element, visual)
[System.Runtime.CompilerServices.Extension()]
public static System.Windows.Media.GeneralTransform C1TransformToVisual( 
   System.Windows.UIElement element,
   System.Windows.UIElement visual
)

Parameters

element
The System.Windows.UIElement that defines the source coordinates.
visual
The System.Windows.UIElement that defines the target coordinates.

Return Value

A transform object that can be used to transform coordinates from the System.Windows.UIElement to the specified object.
Remarks
This is an improved version of System.Windows.UIElement.TransformToVisual. It works in cases that TransformToVisual doesn't, like with UIElements inside System.Windows.Controls.Primitives.Popups.
See Also

Reference

Extensions Class
Extensions Members