How to left align window title in Windows 8 / 2012?

不打扰是莪最后的温柔 提交于 2019-12-22 03:22:55

问题


Is there a way to (intrinsically) left align window title in Windows 8 or 2012 machine?

The Window's title in Window 8 or 2012 is horizontally center-aligned.

We have a WPF application that is ported to Windows 8 / 2012 machine. We are testing it along with couple of our clients and the clients need the title of the window to be left aligned as it was in Window 7 or XP.

I know we can do this using ControlTemplate in WPF but that would be too much for this little thing.

I am sure this is question is going to come up as more applications are ported to Windows 8 / 2012.

Is there any quick solution to this? Or do you know if Microsoft is going to give this flexibility in final releases of Windows 8 or 2012?


回答1:


All window titles in Windows 8 are center aligned. Forcing an application title to be left aligned in Windows 8 would be almost like forcing the minimize and maximize buttons to show up on the left side of the window.

You may be able to accomplish this using a custom draw window like DXWindow from DevExpress. See this post:

http://www.devexpress.com/Support/Center/p/Q298641.aspx

However, the application will appear out of place on Windows 8 and may not pass desktop application certification.




回答2:


It is the default behavior of Windows 8, so it isn't advised.

ALTHOUGH Visual Studio 2012 left-aligns the titles, so it is possible, however inconsistent it may be.

It's doubtful Microsoft will offer up how to override the default functionality or change it since it is already RTM. This may help you get some of the way.



来源:https://stackoverflow.com/questions/11824181/how-to-left-align-window-title-in-windows-8-2012

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!