本文整理匯總了VB.NET中System.Windows.Media.VisualTreeHelper.GetTransform方法的典型用法代碼示例。如果您正苦於以下問題:VB.NET VisualTreeHelper.GetTransform方法的具體用法?VB.NET VisualTreeHelper.GetTransform怎麽用?VB.NET VisualTreeHelper.GetTransform使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Windows.Media.VisualTreeHelper
的用法示例。
在下文中一共展示了VisualTreeHelper.GetTransform方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: Point
' Return the transform for the specified visual object.
Dim transform As Transform = VisualTreeHelper.GetTransform(myDrawing)
' If there is no transform defined for the object, the return value is null.
If transform IsNot Nothing Then
' Return the offset of the returned transform. The offset is relative to the parent of the visual object.
Dim pt As Point = transform.Transform(New Point(0, 0))
End If
示例2: Point
' Return the general transform for the specified visual object.
Dim generalTransform1 As GeneralTransform = myTextBlock.TransformToAncestor(CType(myTextBlock.Parent, Visual))
' Retrieve the point value relative to the parent.
Dim currentPoint As Point = generalTransform1.Transform(New Point(0, 0))