Snoop.SnoopUI.Inspect C# (CSharp) Method

Inspect() public method

public Inspect ( object root, Window ownerWindow ) : void
root object
ownerWindow System.Windows.Window
return void
        public void Inspect(object root, Window ownerWindow)
        {
            this.Dispatcher.UnhandledException += new DispatcherUnhandledExceptionEventHandler(UnhandledExceptionHandler);

            Load(root);

            if (ownerWindow != null)
            {
                this.Owner = ownerWindow;
            }

            SnoopPartsRegistry.AddSnoopVisualTreeRoot(this);

            Show();
            Activate();
        }

Same methods

SnoopUI::Inspect ( ) : void

Usage Example

Exemplo n.º 1
0
        public static void SnoopApplication()
        {
            Dispatcher dispatcher;

            if (Application.Current == null)
            {
                dispatcher = Dispatcher.CurrentDispatcher;
            }
            else
            {
                dispatcher = Application.Current.Dispatcher;
            }

            if (dispatcher.CheckAccess())
            {
                SnoopUI snoop = new SnoopUI();
                var     title = TryGetMainWindowTitle();
                if (!string.IsNullOrEmpty(title))
                {
                    snoop.Title = string.Format("{0} - Snoop", title);
                }

                snoop.Inspect();

                CheckForOtherDispatchers(dispatcher);
            }
            else
            {
                dispatcher.Invoke((Action)SnoopApplication);
                return;
            }
        }
All Usage Examples Of Snoop.SnoopUI::Inspect