与TabControl具有相同样式(阴影)的C#Winforms面板?

与TabControl具有相同样式(阴影)的C#Winforms面板?,c#,coding-style,tabcontrol,panel,C#,Coding Style,Tabcontrol,Panel,我想要一个面板具有某种dropshadow,就像选项卡控件那样,这可能吗?BorderStyle=Fixed3D 看看本例中的阴影: 最后,自定义面板可以是(在VB中): 是的,在面板的喷漆事件中,使用如下内容: void Paint(object sender, PaintEventArgs e) { TabRenderer.DrawTabPage(e.Graphics, e.Bounds); } 表示未启用视觉样式的异常。。。(this.Bounds)与panel.Bounds一

我想要一个面板具有某种dropshadow,就像
选项卡控件那样,这可能吗?

BorderStyle=Fixed3D

看看本例中的阴影:

最后,自定义面板可以是(在VB中):


是的,在面板的喷漆事件中,使用如下内容:

void Paint(object sender, PaintEventArgs e) {
    TabRenderer.DrawTabPage(e.Graphics, e.Bounds);
}

表示未启用视觉样式的异常。。。(this.Bounds)与panel.Bounds一起使用。e不包含Bounds@MysticEarth:Pondidum的意思是创建一个自定义的
myPanel:Panel
并覆盖OnPaint,不是吗?是的,但是使用panels名称也可以,但我手头没有编写代码的编译器:(
void Paint(object sender, PaintEventArgs e) {
    TabRenderer.DrawTabPage(e.Graphics, e.Bounds);
}