Michael.Weinhardt - MSFT
As it looks like you've discovered, Page.WindowTitle does not set the title of a Window if a page is hosted in a frame in a window.
I'm not sure if I understand 100% what you're saying, but you can set the title of the main application window. The main application window is most often the window that was first loaded in a WPF application eg:
<!-- MainWindow will be the main app window -->
<Application ... StartupUri="MainWindow.xaml" />
or
<!-- A NavigationWindow will be the main app window -->
<Application ... StartupUri="HomePage.xaml" />
In this case, you can do the following from your page:
<
Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="SDKSample.PageInFrame"
Loaded="page_Loaded" >
...
</
Page>
using
System;
using
System.Windows;
using
System.Windows.Controls;
namespace
SDKSample
{
public partial class PageInFrame : Page
{
public PageInFrame()
{
InitializeComponent();
}
void page_Loaded(object sender, RoutedEventArgs e)
{
App.Current.MainWindow.Title = "Title of your choice!";
}
}
}