How can i change text and back colors on snoop?

Oct 28, 2015 at 2:11 PM
SNoop sometimes opens with dark text on dark background in the treeview panel. Its very difficult to read, how do I change Snoop colors?
Developer
Oct 31, 2015 at 8:51 PM
Edited Nov 2, 2015 at 4:45 AM
If I understand correctly, the concern is that you Snoop an application, and in some applications, the background is dark under black text, so you cannot see the text at all. I was able to reproduce this issue with a simple app. What happens is that the app has a global style that applies to every single control. In this case, the style may be to set all Grids to "black" for the entire application. This will affect Snoop because Snoop will inject itself INTO the application, and receive the global values. Here are the steps to reproduce.
  1. In your simple application, add this line of code to App.xaml:
    ...
       <ResourceDictionary >
            <Style TargetType="{x:Type Grid}">
                <Setter Property="Background" Value="Black"/>
                <!-- You should notice that one... -->
            </Style>
        </ResourceDictionary>
///
In my case, the whole file looked like this:
<Application x:Class="WpfApplicationSnoopTest.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             StartupUri="MainWindow.xaml">

    <Application.Resources>
        <ResourceDictionary >
            <Style TargetType="{x:Type Grid}">
                <Setter Property="Background" Value="Black"/>
                <!-- You should notice that one... -->
            </Style>
        </ResourceDictionary>
    </Application.Resources>
</Application>
  1. Snoop the application. You will notice that the tree view will have black text as well. You may be wondering "how does the global style in my application affect snoop?" The answer is that Snoop injects itself into the application, so it will inherit all the global styles in the Snooped application.
I don't have an immediate answer at this point to fix this specific issue. I never Snooped such an application before (other than the one I created just now). I'll try to think of something, but you can compile Snoop and think of a bug fix.

If this is not the question, feel free to let me know. Otherwise, does this answer your question? If not, I can provide further answers.