How does Chrome implement its tabs?
I am working on a small application, which I can do in either WinForms or WPF. I'd like to replicate the tab control a la Chrome. However, I am not sure how to get the开发者_运维技巧 tabs into the window border like Chrome does.
Any ideas? Thank you.
Set the FormBorderStyle
(WinForms) or WindowStyle
(WPF) to None
, then draw your own titlebar with tabs on it.
To get glass, you need to use the DWM API.
Alternatively, you can handle the WM_NCPAINT
message.
Create a window without borders and draw your own border-like tabs.
Chrome does not have window style, the buttons are also not standard, that why this look like a tab in window border.
System.Windows.Forms.Form form = ...
form.FormBorderStyle = FormBorderStyle.None
精彩评论