snoopwpf
snoopwpf copied to clipboard
Light mode broken
It looks like this on my machine:

Does that happen with every application you attach to?
I just upgrade to the latest this morning, started my application, snooped it and it was like that. Didn't do anything special. The Dark mode works properly though which I'm using right now as a workaround.
edit And yes, it seems to be happening only in a specific application.
Would it be possible to share your application?
Unfortunately no, it's not my application but my employer's. I can't distribute it.
That'll make it more difficult to fix as i can't reproduce the issue on my machine.
Could you try to snoop Snoop via the "Debug" menu and have a look at the colors Snoop is using?
It looks like, at least, the foreground color seems to be overwritten by the app being snooped, which usually shouldn't be possible as Snoop already does quite a lot to prevent that from happening.
It does this on my machine as well, but malfunctions in Windows dark mode, and works correctly in light mode (I did install the program with dark mode enabled). I can confirm that it is application specific as well, testing it in other apps leads to correct results. Unfortunately my app is also not distributable.
Could you try to use the debug menu in Snoop and choose "Snoop Snoop". After that inspect the Snoop UI itself, have a look at the foreground property of one of the elements in the grid which has a wrong foreground? The foreground should reference to the resource key "Snoop.Brushes.Default.Foreground". Something in your application seems to influence that value.
@NMBSdtayloe @mo-russo Have you tried the above to provide some information on the cause for this issue?
@batzen Can you provide some guidance for how and where this value would be found? I did "Snoop Snoop" and this is maybe what you are looking for. I put a red box around an instance of the foreground brush you mentioned.
@NMBSdtayloe You have to inspect the TextBlock which has the wrong foreground while in dark mode and being attached to your application.
These are some of the instances of textblock in my app. I apologize in advance, I do not have any experience in using snoop or digging through the treeview of a WPF app. I searched for textblock again later and somehow got more results and sometimes just a flat list or it selects the first random textblock it finds.
@NMBSdtayloe Is there a chance we can meet via Zoom, Skype, Teams or something like that? Then you could share your screen and I could tell you what you have to do to narrow down the issue.
Have you guys tried version 4.0.1? Just tested 5.0.2 vs 4.0.1 and on my end this issue happens after 4.0.1. Maybe the error regressed?
I changed quite a lot of the theme code etc. So it's most likely a regression, but as long as there is no repro I can't fix it as it happens with none of the apps I tried. @EgilSandfeld do you have a repro?
@EgilSandfeld @mo-russo @NMBSdtayloe ping
@batzen Have you made any progress on this? I'm having the same issue. However, same as the other users, I can't distribute the app I'm snooping, but I'm willing to help.
@joce i still haven't seen an app causing this issue, so there is sadly still no fix or progress. Could you follow the steps from https://github.com/snoopwpf/snoopwpf/issues/397#issuecomment-1563176855 or would you be available for a call so we can narrow down the cause?
Err. Even doing Snoop Snoop, I get the same issue!
As others pointed out, it works fine when in Dark Mode on my side as well.
Can't you repro when you're in default app mode is Light Mode?
This is what i get when using light mode system wide and attaching Snoop:
Interesting. I DM'd you on twitter to book a Zoom appointment.
@joce Our call was very helpful. I finally found a way to reproduce the issue.