更新时间: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.