BrowserInteropHelper.IsBrowserHosted Property

 

Gets a value that specifies whether the current Windows Presentation Foundation (WPF) application is browser hosted.

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

static member IsBrowserHosted : bool with get

Property Value

Type: System.Boolean

true if the application is browser hosted; otherwise, false.

A Page can be host agnostic and, consequently, can be loaded into several different types of hosts, including a Frame, a NavigationWindow, or a browser. This can happen when you have a library assembly that contains one or more pages, and which is referenced by multiple standalone and browsable (XAML browser application (XBAP)) host applications.

The following example demonstrates how to use BrowserInteropHelper.IsBrowserHosted to determine if a Page is hosted in a browser.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Return to top
Show: