public void CanCreateNavigatorForASourceElementWhenInATree()
        {
            var frame = new Frame();
            var button = new Button();
            frame.Content = button;

            var window = new TestWindow(frame);
            window.Show();
            window.ProcessEvents();

            var resolver = new Mock<IRouteResolver>();
            var factory = new NavigatorFactory(resolver.Object);
            var navigator = factory.GetOwningNavigator(button);
            navigator.ResetHistory();

            window.Close();
        }
        public void ToggleSuppressInputTest()
        {
            var button = new Button();
            var window = new TestWindow(button);
            window.Show();
            
            CheckMouseEvent(window, button, UIElement.PreviewMouseUpEvent, false);
            CheckMouseEvent(window, button, UIElement.PreviewMouseDownEvent, false);
            
            window.ToggleSuppressInput(true);

            CheckMouseEvent(window, button, UIElement.PreviewMouseUpEvent, true);
            CheckMouseEvent(window, button, UIElement.PreviewMouseDownEvent, true);
            
            window.ToggleSuppressInput(false);

            CheckMouseEvent(window, button, UIElement.PreviewMouseUpEvent, false);
            CheckMouseEvent(window, button, UIElement.PreviewMouseDownEvent, false);
            
            window.Close();
        }