Skip to content

No native title bar, hard to differentiate dnGrep windows.. #1426

Closed

Description

@tbone2k-git

Hello! o)

First of all, nice program! I just discovered this very useful and option-rich application! o)

I have one serious issue though, the theme(s) being used do not allow to use the native window title bar colours and frame, which makes finding the dnGrep window(s) unnecessarily difficult. If you already have an application in the background which also uses a dark theme or you have multiple instances of dnGrep open, the title bars and borders of dnGrep get lost "completely".. Let me demonstrate this here:

Image

If I put an application to the front, which uses the native window "style", the difference is very obvious. The regular title and window border is much more easy to recognize and identify as "active window", while at the same time, all the 3 dnGrep windows in the screenshot are "invisible", they enter some kind of camouflage mode!? o)

I would like to use the regular / operating system window styling (title bar and window border) for dnGrep as well, maybe you agree or somebody else thinks the same? o)

Thank you! o)

Image

Activity

  1. doug24 commented on Feb 7, 2026

    @doug24
    Contributor

    I don't think that is a native title bar in Vivaldi, at least I don't have any applications on my system with a title bar like that.

    All dnGrep window and controls are themed, and making the title bar a different color is very easy to do, but I'm not going to change the standard themes. I created a new theme for you and called it DarkColorful (the filename becomes the theme name).

    DarkColorful.zip

    To use the theme, unzip it, put it in your configuration folder, restart dnGrep, and select the theme in the Options dialog.

    Your configuration folder could be one of three places:

    • If you installed dnGrep in Program Files, the %APPDATA%\dnGrep folder (typically that is C:\Users\youraccount\AppData\Roaming\dnGrep),
    • If you use the zip installation or install in a writable directory, the themes are in the "Themes" subfolder of the application folder.
    • You can also move the configuration folder to another location - see Options - Directories.

    The 'About > Application data' menu item will open the current configuration directory.

    The themes are stored in xaml Resource Dictionaries. For this theme, I copied the default Dark theme and changed the color of four elements:
    Caption.Background
    Caption.Background.Inactive
    Caption.Dialog.Background
    Window.Border.Active

    In the current release of dnGrep the Window border thickness is fixed at 1 and the Window.Border.Active color isn't visible (at least on my monitor). In the next release I will make the border thickness configurable in the theme file by adding this element to the theme file:

    <Thickness x:Key="Window.Border.Thickness">2</Thickness>
    

    There is a free Theme Editor available - see that page for more details.

    Here is a screenshot of DarkColorful.xaml with the border thickness set to 2. Thickness is a floating-point number, so you can try 1.5, for example which gives me a hairline border.

    Image
  2. tbone2k-git commented on Feb 7, 2026

    @tbone2k-git
    Author

    Hello doug24, thank you for caring and taking the time! o))
    I like what I see in your screenshot.. o)

    Here is just a quick proof that my window styling is native, showing Vivaldi with "Native Window" enabled and some old school Windows applications using the default look and feel of course. dnGrep is on top of these and then there is the Windows-Settings application, which totally ignores all the "Standards". I don't know what is going on anymore on modern desktops. Each application I launch looks different, I am not a fan of this random behaviour! o)

    I used "regular" Windows 10 features to get back the colourful title bars on "Win32 (?)" applications (by enabling accent colours on title bars e.g. in the Windows settings), I also reduced the window title bar height by adjusting a registry entry directly.

    Why on earth the "Windows Settings" application does not use the blue title bar as well, only Microsoft knows I guess.

    Image

    I tweaked your new theme just a bit, to make the window buttons white when window is active by setting "Caption.Button.Foreground" to white with your ThemeEditor you suggestes. What a handy tool you have there, how awesome! o))

    Image

    Now "dnGrep" fits into the system default style (apart from the title bar height, but anyway!) Amazing! o)
    Thank you very much for your kind and detailed instructions and even taking care for the little things (like the new window border setting in the next release, not sure it is necessary though, I already see that little blue window border here, like in the other "old school" applications?!).

    This is class A support! o)
    Thank you very much and have a nice weekend! o)

    Final result, showing various "active" title bars at the same time:
    dnGrep fits in there "kinda" perfect now and is easy to see / recognize when active! o)

    Image
  3. tbone2k-git commented on Feb 7, 2026

    @tbone2k-git
    Author

    Some additional tinkering..

    Maybe there is no special "treatment" necessary to get a native look for the window title bar in a WPF application? I am not very familiar with this GUI toolkit, but when looking around for a solution and asking one of these "smart-*ss" bots, it came up with a suggestion to not touch (or set explicitly) the WindowBorderStyle to "SingleBorderWindow" (which is also the default it seems).

    I was curious, so I ran a little WPF application I did recently to see how the title bar looks. This one seems to use the native window decoration by default. It's just a little powershell script, which parses that "xaml" from a string (tree view code removed for clarity). So I am not sure. dnGrep probably has "full" theming, including the title bar, so the native window decoration is not present I guess?!

    I am not against theming, I just try to get behind the various "looks and feels" and why they exist, why there is no common standard anymore. It all makes no sense to me how application windows look these days, they all look differently, even those OEM windows and applications from Microsoft - from my little point of view, this is a very bad design choice.

    Anyway, thank you! o)

    Image
    Add-Type -AssemblyName PresentationFramework
    
    $xaml = @"
    <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            Title="TreeView Example" Height="400" Width="300">
        <Grid>
            <TreeView Name="TreeViewControl" Margin="10" />
        </Grid>
    </Window>
    "@
    
    $xmlDocument = New-Object System.Xml.XmlDocument
    $xmlDocument.LoadXml($xaml)
    $reader = New-Object System.Xml.XmlNodeReader $xmlDocument
    $window = [Windows.Markup.XamlReader]::Load($reader)
    
    $treeView = $window.FindName("TreeViewControl")
    
    $window.ShowDialog()
    
  4. indigofairyx commented on Feb 7, 2026

    @indigofairyx

    Hiya again. I agree, old school or winaero era apps were much more functional in design and easy for the eyes compared to every being flat with a single pixel border for edge resize. Phones need to be simple and microslop are the worst offenders here. Anyway if you still on win10 @tbone2k-git check this app out. I use winaero tweaker to set my active\inactive title bar colors then match then in the tool https://www.stardock.com/products/shadowfx/

    And now I have borders again , in most apps anyway. No more getting lost in the dark.

  5. doug24 commented on Feb 7, 2026

    @doug24
    Contributor

    @tbone2k-git Yes, I changed my settings and you are right, the default WPF app title bar will pick up the accent color when that system setting is enabled. I'm not sure how I would support both and given you have a solution that works, I'm not planning to make changes in that area.

  6. tbone2k-git commented on Feb 8, 2026

    @tbone2k-git
    Author

    Good morning! o)

    I did not try, but setting "WindowBorderStyle" to "SingleBorderWindow" should do the trick? In theory it should be more easy to open a WPF window without any custom window decorations, right? I mean this worked fine for 3 decades in Windows, it can't be not possible any more?! o)

    If you don't plan to do any changes here, it's fine! o) I can get along with that theme being edited! o)

    This is more about general "development" recently, where each application comes in with its own UI styling and window "look and feel". I think it is great that this is possible and for many "consumer grade" applications this might make sense (like for movie players or something), but I don't see why professional software does not stick to operating system default rules any more.

    Theming is welcome, but not respecting OS defaults is.. well, not optimal at least. I cannot get in contact with other developers out there to change their "theme", like it was possible here - fortunately! o). So, I think respecting the operating system defaults "by default" still makes sense in a lot of cases.

    No offense, you did a great job, even providing the Theme Editor, but you probably get my vibe about this. I'm all in for "let's have sensible standards" again, like we had 10-20 years back.

    By the way: I was very very happy to find even regular scrollbars in dnGrep! o)) What a joy to use a regular, always visible, decent width scrollbar! Something so simple, but just awesome to use in comparison to what other applications and even Win11 offer to the user these days (too slim, too narrow, dimmed appearance, no arrow-buttons, auto-hiding --> just totally horrible to use!). It's like everybody is ashamed of showing a scroll bar these days. What are these UI designers smoking? A scroll bar is a feature to allow easy navigation and visualization of where in a document you are right now. What comes next, they hide the mouse pointer or something? o))

    So we are living in a time, where I already enjoy seeing regular scroll bars, what does that tell about the UI design space?! o)

    Have a nice Sunday and thank you again! o)

  7. doug24 commented on Feb 8, 2026

    @doug24
    Contributor

    dnGrep already uses SingleBorderWindow style. The issue is to apply a theme to the caption, the Window class is subclassed with a different control template. When I added the themes seven years ago, there was nothing in WPF to support dark themes. Now there is a way to have a light or dark title bar. There are many settings to respect, but if a user wants to have dnGrep in one of the dark themes they must either choose Dark Mode for all applications or use the accent color setting. So if they don't also make changes to the system settings, they will end up with a dark theme with a white title bar.

    There is also one window in dnGrep that has an additional control button on the top right. That can't be done without subclassing and applying a new template. It's not easy to go back.

  8. doug24 commented on Feb 12, 2026

    @doug24
    Contributor

    Added in v4.6.110

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions