Export (0) Print
Expand All

HtmlWindow.Navigate Method (Uri, String, String)

Silverlight

Opens the specified page in the specified browser instance, with the indicated user interface features.

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

public HtmlWindow Navigate(
	Uri navigateToUri,
	string target,
	string targetFeatures
)

Parameters

navigateToUri
Type: System.Uri
The URL of the page to open.
target
Type: System.String
The name of the window or tab that navigateToUri should be opened in.
targetFeatures
Type: System.String
A comma-delimited list of browser-specific features.

Return Value

Type: System.Windows.Browser.HtmlWindow
A reference to the underlying window object that represents the new browser.

ExceptionCondition
ArgumentNullException

navigateToUri, target, or targetFeatures is null.

This method overload gives you the ability to open a new page in an existing browser instance other than the current browser. It is equivalent to the JavaScript open method with the target property set to the name of an existing browser.

The target parameter specifies the name of the browser instance that the navigateToUri address should be opened in:

  • If target specifies an existing browser, the URL is loaded into that browser.

  • If the target parameter is an empty string, the method functions like the Navigate(Uri) method overload, and the URL is loaded into the current browser.

NoteNote:

Your system and browser configuration settings control whether browser instances are displayed as windows, tabs, or multiple-document interface (MDI) child windows.

The targetFeatures parameter is a string that contains a comma-delimited list of features that are browser-specific. This parameter controls browser features that are displayed when the user navigates to a new page or opens a new window.

For more information, see the open method in the dynamic HTML (DHTML) documentation.

The following code example demonstrates how to use this method.


System.Windows.Browser.HtmlPage.Window.Navigate(
    new Uri("http://silverlight.net"), 
    "_blank", "height=300,width=600,top=100,left=100");


Silverlight

Supported in: 5, 4, 3

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

Community Additions

ADD
Show:
© 2014 Microsoft