Esempio n. 1
0
        bool IViewHierarchyHandler.TryGetHighlightedView(double x, double y, bool clear, out IInspectView highlightedView)
        {
            highlightedView = null;

            var view = Mouse.DirectlyOver as FrameworkElement;

            if (view == null)
            {
                return(false);
            }

            highlightedView = new WpfInspectView(view, withSubviews: false);
            return(true);
        }
Esempio n. 2
0
        bool IViewHierarchyHandler.TryGetRepresentedView(object view, bool withSubviews, out IInspectView representedView)
        {
            if (view is Application)
            {
                representedView = new WpfRootInspectView {
                    DisplayName = Identity.ApplicationName
                };
                return(true);
            }

            var frameworkElement = view as FrameworkElement;

            if (frameworkElement != null)
            {
                representedView = new WpfInspectView(frameworkElement, withSubviews);
                return(true);
            }

            representedView = null;
            return(false);
        }