How can I make a window in WPF that looks like the attached (notice the “collapse” button to the left of the minimize/maximize buttons)? I’ve sifted through the documentation at length to no avail. Any insight into this matter is much appreciated 🙂
Share
There’s nothing really specific to WPF for doing this. You have to resort to Win32 P/Invoke to draw in the non-client area. Fortunately, searching for topics related to this is very easy if you search for
WM_NCPAINT( google / stackoverflow ) but unfortunately, it’s not trivial to do. So I don’t think it would be very helpful for my to write up a complete example when there’s many C# examples available here.The only thing specific to WPF that you need to do is use the
HwndSourceclass to specify a hook procedure to process the message.