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); }
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); }