Answer
The Application creates Windows; each Window raises Created, Activated, Deactivated, Stopped, Resumed, and Destroying. App-level state changes map to the active window's events. Use them for app-wide concerns (persist on Stopped, refresh on Resumed), while page OnAppearing/OnDisappearing handle per-screen concerns.
window.Activated += (s, e) => _analytics.TrackForeground();
window.Deactivated += (s, e) => _analytics.TrackBackground();Real-world example Analytics logs foreground/background transitions from window Activated/Deactivated events across the whole app.