更改 WPF 标题栏背景颜色 [英] Changing WPF title bar background color

查看:80
本文介绍了更改 WPF 标题栏背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 WPF Windows 应用程序.我需要更改标题栏的背景颜色.我该怎么做?

I have a WPF Windows application. I need to change the background color of the title bar. How can I do that?

推荐答案

在 WPF 中,标题栏是非客户区的一部分,不能通过 WPF 窗口类进行修改.您需要操作 Win32 句柄(如果我没记错的话).
这篇文章可能对您有所帮助:自定义窗口 Chrome

In WPF the titlebar is part of the non-client area, which can't be modified through the WPF window class. You need to manipulate the Win32 handles (if I remember correctly).
This article could be helpful for you: Custom Window Chrome

这篇关于更改 WPF 标题栏背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆