Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Page.WindowTitle Property

Gets or sets the title of the host Window or NavigationWindow of a Page.

Namespace: System.Windows.Controls
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

[LocalizabilityAttribute(LocalizationCategory.Title)] 
public string WindowTitle { get; set; }
/** @property */
public String get_WindowTitle ()

/** @property */
public void set_WindowTitle (String value)

public function get WindowTitle () : String

public function set WindowTitle (value : String)

<object WindowTitle="string" .../>

Property Value

A String value that is the title of a window that directly hosts a Page.

By default, the title of a window that hosts a page, including NavigationWindow and Windows Internet Explorer, is the name of the file that is currently being hosted (.xaml if the page is loose Extensible Application Markup Language (XAML), or .xbap if the page is part of an XAML browser application (XBAP)).

A page can change the default by setting its WindowTitle property.

Once a page sets the title of a window in this way, the window's title does not change until another page sets WindowTitle with a different value.

NoteNote:

The Page must be the topmost piece of content in a window for WindowTitle to have an effect; if a Page is hosted within a Frame, for example, setting WindowTitle will not change the title of the host window.

WindowTitle can also be used to generate the name of the navigation history entry for a piece of navigated content. The following pieces of data are used to automatically construct a navigation history entry name, in order of precedence:

  • The attached Name attribute.

  • Title.

  • WindowTitle and the uniform resource identifier (URI) for the current page

  • The uniform resource identifier (URI) for the current page.

If you have associated a CustomContentState object with a piece of content in navigation history, you can specify the name value of a navigation history element by overriding JournalEntryName.

The following example shows how to set the title of a window from a page.

<Page
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Page Title"
    WindowTitle="Window Title"
    >
</Page>

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft