如何为WPF页面赋予标题 [英] How to give title to WPF pages
本文介绍了如何为WPF页面赋予标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可以在设计时通过XAML代码本身为WPF窗口提供标题,并在运行时将其显示给窗口.
It is possible to give the title to WPF window through XAML code itself at design time and it is showing the title to window at runtime.
XAML中的代码就像
the code in the XAML is like
Window1.Title="FormulaBuilder"
对于WPF页面,它也在XAML代码中给出,例如
For the WPF pages also it is given in the XAML code like
Page1.Title="EmployeeMaster"
但是它没有在运行时显示标题
But it is not showing the title at Runtime
然后我尝试通过C#编码给标题
Then I tried to give the title through C# coding
Page1 obj=new Page1();
obj.Title="EmployeeMaster";
但是它没有在运行时显示标题.
But it is not showing the title at runtime.
推荐答案
查看全文