How can I change my Xaml page title dynamically in a WPF application?
You can set page's Title by set Title property in your code.
this.Title = "My Application" + DateTime.Now;
Try this.
this.WindowTitle = "Your title here";
You can create a function like this
public void SetPageTitle(dynamic title)
{
string DefaultTitle = "Name";
try
{
this.Title = title.ToString();
}
catch
{
this.Title = DefaultTitle;
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With