Chrome如何实施其标签? [英] How does Chrome implement its tabs?
本文介绍了Chrome如何实施其标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在开发一个小应用程序,我可以在WinForms或WPF中执行此操作。我想复制一个Chrome浏览器的标签控制。但是,我不确定如何将标签放入窗口边框,例如Chrome。
有什么想法?
解决方案
设置 FormBorderStyle
(WinForms)或 WindowStyle
(WPF)到 None
,然后绘制您自己的标题栏并添加标签。
要获得杯子,您需要使用DWM API 。
或者,您可以处理 WM_NCPAINT
消息。
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.
这篇关于Chrome如何实施其标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文