Application.AppearanceChanged
From Xojo Documentation
Event
Called when a user switches between Light and Dark mode or when the accent color changes.
Notes
Use this event to update any graphics or other UI as needed.
See Also
FillColor, FrameColor, TextColor methods; UserGuide:Dark Mode topic