diff --git a/src/Uno.UI.Toolkit/Diagnostics/DiagnosticsOverlay.cs b/src/Uno.UI.Toolkit/Diagnostics/DiagnosticsOverlay.cs index 0ff4bd4ca1e4..e796ed5b617e 100644 --- a/src/Uno.UI.Toolkit/Diagnostics/DiagnosticsOverlay.cs +++ b/src/Uno.UI.Toolkit/Diagnostics/DiagnosticsOverlay.cs @@ -537,7 +537,7 @@ private bool ShouldMaterialize(DiagnosticViewRegistration registration) { DiagnosticViewRegistrationMode.All => true, DiagnosticViewRegistrationMode.OnDemand => false, - _ => _overlays.Count(overlay => overlay.Value.IsMaterialized(registration.View)) is 0 + _ => !_overlays.Any(overlay => overlay.Value.IsMaterialized(registration.View)) }; }