Closed IeuanWalker closed 4 years ago
Correct. What happens is that DebugRainbows hooks into the page events just before it's being displayed to go through all the elements and change the color depending on those ShowGrid / ShowColors booleans.
What you're essentially doing on the button click is setting the boolean to true that it needs to change elements, but the necessary page reload that actually does this is not happening. This is why you don't see the changes. It's very much meant to work in unison with a HotReload kind of component instead of being a runtime changeable thing.
@sthewissen thanks, makes sense :)
Trying to set some toolbar items to help make it easier to debug. The below code has been added to a base page.
In the page constructor I've added this -
Then the clicked event is this (will add a property to toggle the option once it works) -
The DebugRainbow.SetShowColors() line is hit without error but none of the colours changes. Adding
DebugRainbow.SetShowColors(this, true);
to the constructor works fine.Same issue with SetShowGrid()