Window.Title Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a string used for the window title.
public:
property Platform::String ^ Title { Platform::String ^ get(); void set(Platform::String ^ value); };
winrt::hstring Title();
void Title(winrt::hstring value);
public string Title { get; set; }
var string = window.title;
window.title = string;
Public Property Title As String
Property Value
The string used for the window title.
Examples
public MainWindow()
{
InitializeComponent();
Title = "App title";
}
Note
In Windows App SDK 1.3.0 and earlier, Title
shows in the XAML IntelliSense for Window
, but setting it in XAML causes an error. Set this property in code instead. In Windows App SDK 1.3.1 and later, you can set this property in XAML.
<Window
...
Title="App title">
...
</Window>
Remarks
For more information, see Title bar customization
By default, the title bar shows the app's display name as the window title. The display name is set in the Package.appxmanifest
file. To replace the title with custom text, set the Window.Title
property to a text value, as shown in the Examples.
In addition to the title bar, this string is used in other system UI such as the application switcher (Alt-Tab).
This is a wrapper for SetWindowText.
If ExtendsContentIntoTitleBar is set to true
, this value is not displayed by the title bar.