本文整理汇总了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))