Open poteb opened 4 hours ago
More code that shows how I have checked that the value of b
is indeed changing.
DarkModeHandler.AddListener(b =>
{
Console.WriteLine($"Setting color scheme to {(b ? "dark" : "light")}");
_map1.InteropObject.SetOptions(new MapOptions{ColorScheme = b ? ColorScheme.Dark : ColorScheme.Light});
});
DarkModeHandler
is my own class where the switch changes the value.
Startup
ColorScheme
is set toColorScheme.Light
. I have a toggle switch that changes my site to dark mode. I update the map to dark mode like this:_map1.InteropObject.SetOptions(new MapOptions{ColorScheme = b ? ColorScheme.Dark : ColorScheme.Light});
This works fine. But when I want to change it back to light mode nothing happens.