Epic feature request: Window should be totally customizable
See original GitHub issueWhat we, developers need in late 2021 is to have full control over the Windows that we design without having to spend hours to fix all gotchas or use third-party libraries. What I mean by control over the Window is being able to simply customize the caption area and window borders (or lack of thereof if we wish). One could say all you need to do is to set WindowStyle="None"
which is partially true, because now we have to reinvent the wheel by fixing lots of issues and re-implement lost functionality.
- Allow customizing appearance and content. See Edge, VS Code or Teams - application real estate is not wasted; there are menus, search fields, tabs and custom buttons in the window caption. WPF gives us icon, window title and min/max/close buttons. Can’t even choose colours.
- With
WindowStyle="None"
one has to re-create min/max/close buttons and implement them (which is not that hard), but W11’s snapping tooltip will not be supported anyway (I believe there is already an open issue to add this). - Allow to easily set window draggable area or control (where you can click and drag the window around)
- Fix window placement when maximized. Currently, window will cover the taskbar and will ever so slightly be bigger than what we can actually fit on the screen - we have to add about 7px of padding or border when maximized to fix that.
To summarize, the amount of work we have to do for our apps to feel nice and modern is crazy and we would like to have a better experience without the need to re-invent the wheel. For anyone wanting to challenge themself here is the most-comprehensive walkthrough I could find to achieve what I described: https://engy.us/blog/2020/01/01/implementing-a-custom-window-title-bar-in-wpf/
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:5 (2 by maintainers)
Top GitHub Comments
I agree, workarounds exist, but the whole idea of WPF being UI framework of choice becomes difficult to justify if basic design principles are so difficult to implement.
Wasn’t WindowChrome a Solution for this? https://docs.microsoft.com/de-de/dotnet/api/system.windows.shell.windowchrome?view=windowsdesktop-6.0