TreeView.AppearanceChanged Event
This event is fired when Light vs Dark mode is toggled in the system. You also get this event once in first paint event, to give your code chance to set the desired settings for the initial state.

AppearanceChanged(
isDarkMode
as Boolean,
initialSetting
as Boolean)
Parameters
- isDarkMode
- True if application is in dark mode, else false.
- initialSetting
- True if the event is fired to give you chance to set your initial values, false if appearance actually changed in the system.
Remarks
See Also
TreeView Control