示例#1
0
        public override void DisplayVisualTree()
        {
            AutomationElement rootAutomationElement = this.RootAutomationElement;

            if (w != null)
            {
                w.Closing -= W_Closing;
                avv        = null;
                w          = null;
            }
            avv = new UIVisualViewer.UIVisualViewer(ApplicationName);
            avv.LoadTree(rootAutomationElement);
            w          = new Window();
            w.Closing += W_Closing;
            w.Content  = avv;
            w.Show();
        }
示例#2
0
 private void W_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     w   = null;
     avv = null;
 }