Window.Title Property

Gets or sets the window title bar text.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)

'Declaration
Public Property Title As String

Property Value

Type: System.String
The title bar text.

ExceptionCondition
NotSupportedException

The application is not running outside the browser.

The following Silverlight 5 code example shows how a trusted, out-of-browser application can display an arbitrary user control in a separate window. This example requires a UserControl subclass named DemoUserControl.


If (Application.Current.IsRunningOutOfBrowser AndAlso _ 
    Application.Current.HasElevatedPermissions)

    Dim newWindow As New Window With
    {
        .Title = "Demo Window # " &
            Application.Current.Windows.Count.ToString(),
        .Height = 300,
        .Width = 300,
        .Top = 0,
        .Left = 0,
        .Content = New DemoUserControl(),
        .Visibility = Visibility.Visible
    }
End If


Silverlight

Supported in: 5

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show: