private void PrintLogicalTree(int depth, object obj)

        {

            System.Diagnostics.Debug.WriteLine(new string(' ', depth) + obj);

            if (!(obj is DependencyObject))

            {

                return;

            }

            foreach (object child in LogicalTreeHelper.GetChildren(obj as DependencyObject))

            {

                PrintLogicalTree(depth + 1, child);

            }

        }

 

public AboutDialog()

        {

            InitializeComponent();

            PrintLogicalTree(0,this);

        }

相关文章:

  • 2022-12-23
  • 2021-12-06
  • 2021-11-13
  • 2021-12-08
  • 2022-12-23
  • 2021-08-17
  • 2022-12-23
  • 2021-12-02
猜你喜欢
  • 2022-02-11
  • 2021-11-18
  • 2021-11-04
  • 2021-09-05
  • 2021-06-01
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案