//File:Window.xaml.vb Imports System Imports System.Diagnostics Imports System.Windows Imports System.Windows.Media Public Partial Class AboutDialog Inherits Window Public Sub New() InitializeComponent() End Sub Protected Overrides Sub OnContentRendered(e As EventArgs) MyBase.OnContentRendered(e) PrintVisualTree(Me) End Sub Private Sub PrintVisualTree(obj As DependencyObject) Debug.WriteLine(obj) For i As Integer = 0 To VisualTreeHelper.GetChildrenCount(obj) - 1 PrintVisualTree(VisualTreeHelper.GetChild(obj, i)) Next End Sub End Class