The dark mode change will only work on MacOS 10.14 Mojave.
Technically when you enable the Dark Mode option (under Build Settings) in Xojo or add the below to your info.plist
will tell the app to work with dark mode.
If you set all your font colors to #000000 and background colors to #FFFFFF, the app will automatically switch between dark and light mode automatically.
Under App, you can add an Event Handler "AppearanceChanged" for those controls which doesn't behave. However this will only handle when the user change the theme while running your app. So you need to also add the same codes to your Window Open Handler.
If IsDarkMode Then
window1.label1.TextColor = Color.green
window1.label1.TextColor = Color.blue