I'm having problems drawing Windows 10 themed Window Caption Buttons using the VisualStyleRenderer class.
My problem is that I can't figure out which Theme Class to use.
I tried Window
and CompositedWindow::Window
, however, none of those actually contain Windows 10 themed buttons as I found out using this msstyle editor.
Which Theme Class contains Windows 10 themed Caption Buttons?
How it looks now:
How I want it to look:
How I'm drawing the buttons:
protected override void OnPaint(PaintEventArgs e)
{
VisualStyleRenderer renderer = new VisualStyleRenderer("Window", 18 /*WP_CLOSEBUTTON*/, 1 /*CBS_NORMAL*/);
var size = renderer.GetPartSize(e.Graphics, ThemeSizeType.True);
renderer.DrawBackground(e.Graphics, new System.Drawing.Rectangle(10, 10, size.Width, size.Height));
}