Skip to content

WindowDevTools class

A window’s development tools: element inspector, visual tree, performance monitor and profiler. Reached through DevTools, which is null when the app did not opt in.

public sealed class WindowDevTools
name description
InspectorIsVisible { get; } Whether the inspector overlay is on this window.
PerformanceMonitorIsVisible { get; } Whether the performance monitor overlay is on this window.
ProfilerIsOpen { get; } Whether the profiler window is open.
VisualTreeIsOpen { get; } Whether the visual tree window is open.
event InspectorVisibleChanged Raised when the inspector overlay appears or disappears.
event PerformanceMonitorVisibleChanged Raised when the performance monitor overlay appears or disappears.
event ProfilerOpenChanged Raised when the profiler window opens or closes.
event VisualTreeOpenChanged Raised when the visual tree window opens or closes.
ToggleInspector() Shows or hides the element inspector overlay.
TogglePerformanceMonitor() Shows or hides the frame statistics overlay.
ToggleProfiler() Opens or closes the profiler timeline window.
ToggleVisualTree() Opens or closes the visual tree window.
static IsSupported { get; } Whether this build can host the development tools. False in release, trimmed and NativeAOT builds, where the trimmer folds this to a constant so guarded app code is removed too.