且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在WPF窗口中设置标题的对齐方式?

更新时间:2023-12-03 15:56:16

如果将其添加到 Window Element Title = Name ;之后


TextBlock.TextAlignment = Center; 添加到窗口元素。



否则你可以参考以下



在wpf的microsoft窗口标题栏中放置标题 [ ^ ]



希望它能为您提供帮助。
The following works if you add it to your Window Element right after Title=Name;.

Add TextBlock.TextAlignment=Center; to your window element.

else you can refer the below

location of title in title bar in microsoft window in wpf[^]

Hope it will help you.