Returns a transform that can be used to transform coordinates from the Visual to the specified visual object descendant.
Assembly: PresentationCore (in PresentationCore.dll)
The following code example shows how to use the method to retrieve the offset of the StackPanel relative to its child TextBlock. The offset values are contained within the returned GeneralTransform value.
The offset takes into account the Margin values for all objects. In this case, X is -4, and Y is -4. The offset values are negative values because the parent object is negatively offset relative to its child object.