2 out of 3 rated this helpful - Rate this topic

WebBrowser Class

July 26, 2012

Allows HTML rendering and navigation functionality to be embedded in an application.

Namespace:  Microsoft.Phone.Controls
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)
XMLNS for XAML: Not mapped to an xmlns.
[TemplatePartAttribute(Name = "StateContainer", Type = typeof(Border))]
[TemplateVisualStateAttribute(Name = "Disabled", GroupName = "WebBrowserStates")]
[TemplatePartAttribute(Name = "PresentationContainer", Type = typeof(Border))]
[TemplateVisualStateAttribute(Name = "Normal", GroupName = "WebBrowserStates")]
public sealed class WebBrowser : Control
<WebBrowser .../>

The WebBrowser type exposes the following members.

  NameDescription
Public methodWebBrowserInitializes a new instance of the WebBrowser class.
Top
  NameDescription
Public propertyActualHeight (Inherited from FrameworkElement.)
Public propertyActualWidth (Inherited from FrameworkElement.)
Public propertyAllowDrop (Inherited from UIElement.)
Public propertyBackground (Inherited from Control.)
Public propertyBaseSets the base directory within isolated storage that is used to resolve relative references within the WebBrowser control.
Public propertyBorderBrush (Inherited from Control.)
Public propertyBorderThickness (Inherited from Control.)
Public propertyCacheMode (Inherited from UIElement.)
Public propertyClip (Inherited from UIElement.)
Public propertyCursor (Inherited from FrameworkElement.)
Public propertyDataContext (Inherited from FrameworkElement.)
Protected propertyDefaultStyleKey (Inherited from Control.)
Public propertyDesiredSize (Inherited from UIElement.)
Public propertyDispatcher (Inherited from DependencyObject.)
Public propertyFlowDirection (Inherited from FrameworkElement.)
Public propertyFontFamily (Inherited from Control.)
Public propertyFontSize (Inherited from Control.)
Public propertyFontStretch (Inherited from Control.)
Public propertyFontStyle (Inherited from Control.)
Public propertyFontWeight (Inherited from Control.)
Public propertyForeground (Inherited from Control.)
Public propertyHeight (Inherited from FrameworkElement.)
Public propertyHorizontalAlignment (Inherited from FrameworkElement.)
Public propertyHorizontalContentAlignment (Inherited from Control.)
Public propertyIsEnabled (Inherited from Control.)
Public propertyIsGeolocationEnabledDetermines whether a website that is hosted in the WebBrowser control can use location services on the device.
Public propertyIsHitTestVisible (Inherited from UIElement.)
Public propertyIsScriptEnabledEnables or disables scripting. This applies to the next document that is navigated to, not the current document. This property is false by default. Set this property to true to enable scripting, or false to disable scripting.
Public propertyIsTabStop (Inherited from Control.)
Public propertyLanguage (Inherited from FrameworkElement.)
Public propertyMargin (Inherited from FrameworkElement.)
Public propertyMaxHeight (Inherited from FrameworkElement.)
Public propertyMaxWidth (Inherited from FrameworkElement.)
Public propertyMinHeight (Inherited from FrameworkElement.)
Public propertyMinWidth (Inherited from FrameworkElement.)
Public propertyName (Inherited from FrameworkElement.)
Public propertyOpacity (Inherited from UIElement.)
Public propertyOpacityMask (Inherited from UIElement.)
Public propertyPadding (Inherited from Control.)
Public propertyParent (Inherited from FrameworkElement.)
Public propertyProjection (Inherited from UIElement.)
Public propertyRenderSize (Inherited from UIElement.)
Public propertyRenderTransform (Inherited from UIElement.)
Public propertyRenderTransformOrigin (Inherited from UIElement.)
Public propertyResources (Inherited from FrameworkElement.)
Public propertySourceGets or sets the URI location of the WebBrowser control.
Public propertyStyle (Inherited from FrameworkElement.)
Public propertyTabIndex (Inherited from Control.)
Public propertyTabNavigation (Inherited from Control.)
Public propertyTag (Inherited from FrameworkElement.)
Public propertyTemplate (Inherited from Control.)
Public propertyTriggers (Inherited from FrameworkElement.)
Public propertyUseLayoutRounding (Inherited from UIElement.)
Public propertyVerticalAlignment (Inherited from FrameworkElement.)
Public propertyVerticalContentAlignment (Inherited from Control.)
Public propertyVisibility (Inherited from UIElement.)
Public propertyWidth (Inherited from FrameworkElement.)
Top
  NameDescription
Public methodAddHandler (Inherited from UIElement.)
Public methodApplyTemplate (Inherited from Control.)
Public methodArrange (Inherited from UIElement.)
Protected methodArrangeOverride (Inherited from FrameworkElement.)
Public methodCaptureMouse (Inherited from UIElement.)
Public methodCheckAccess (Inherited from DependencyObject.)
Public methodClearValue (Inherited from DependencyObject.)
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodFindName (Inherited from FrameworkElement.)
Public methodFocus (Inherited from Control.)
Public methodGetAnimationBaseValue (Inherited from DependencyObject.)
Public methodGetBindingExpression (Inherited from FrameworkElement.)
Public methodGetHashCode (Inherited from Object.)
Protected methodGetTemplateChild (Inherited from Control.)
Public methodGetType (Inherited from Object.)
Public methodGetValue (Inherited from DependencyObject.)
Public methodInvalidateArrange (Inherited from UIElement.)
Public methodInvalidateMeasure (Inherited from UIElement.)
Public methodInvokeScript(String)Executes a scripting function defined in the currently loaded document.
Public methodInvokeScript(String, String[])Executes a scripting function defined in the currently loaded document, and passes the function an array of string parameters.
Public methodMeasure (Inherited from UIElement.)
Protected methodMeasureOverride (Inherited from FrameworkElement.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodNavigate(Uri)Initiates a navigate request to the provided URI.
Public methodNavigate(Uri, Byte[], String)Initiates a navigate request to the provided URI. This method allows customizable options for including posted form data and HTTP headers.
Public methodNavigateToStringInjects an HTML string into the web browser control for rendering.
Public methodOnApplyTemplateDo not use this method. It is unsupported. (Overrides FrameworkElement.OnApplyTemplate().)
Protected methodOnCreateAutomationPeer (Inherited from UIElement.)
Protected methodOnDoubleTap (Inherited from Control.)
Protected methodOnDragEnter (Inherited from Control.)
Protected methodOnDragLeave (Inherited from Control.)
Protected methodOnDragOver (Inherited from Control.)
Protected methodOnDrop (Inherited from Control.)
Protected methodOnGotFocus (Inherited from Control.)
Protected methodOnHold (Inherited from Control.)
Protected methodOnKeyDown (Inherited from Control.)
Protected methodOnKeyUp (Inherited from Control.)
Protected methodOnLostFocus (Inherited from Control.)
Protected methodOnLostMouseCapture (Inherited from Control.)
Protected methodOnManipulationCompleted (Inherited from Control.)
Protected methodOnManipulationDelta (Inherited from Control.)
Protected methodOnManipulationStarted (Inherited from Control.)
Protected methodOnMouseEnter (Inherited from Control.)
Protected methodOnMouseLeave (Inherited from Control.)
Protected methodOnMouseLeftButtonDown (Inherited from Control.)
Protected methodOnMouseLeftButtonUp (Inherited from Control.)
Protected methodOnMouseMove (Inherited from Control.)
Protected methodOnMouseRightButtonDown (Inherited from Control.)
Protected methodOnMouseRightButtonUp (Inherited from Control.)
Protected methodOnMouseWheel (Inherited from Control.)
Protected methodOnTap (Inherited from Control.)
Protected methodOnTextInput (Inherited from Control.)
Protected methodOnTextInputStart (Inherited from Control.)
Protected methodOnTextInputUpdate (Inherited from Control.)
Public methodReadLocalValue (Inherited from DependencyObject.)
Public methodReleaseMouseCapture (Inherited from UIElement.)
Public methodRemoveHandler (Inherited from UIElement.)
Public methodSaveToStringReturns a string containing the HTML content of the webpage.
Public methodSetBinding (Inherited from FrameworkElement.)
Public methodSetValue (Inherited from DependencyObject.)
Public methodToString (Inherited from Object.)
Public methodTransformToVisual (Inherited from UIElement.)
Public methodUpdateLayout (Inherited from UIElement.)
Top
  NameDescription
Public eventBindingValidationError (Inherited from FrameworkElement.)
Public eventDoubleTap (Inherited from UIElement.)
Public eventGotFocus (Inherited from UIElement.)
Public eventHold (Inherited from UIElement.)
Public eventIsEnabledChanged (Inherited from Control.)
Public eventKeyDown (Inherited from UIElement.)
Public eventKeyUp (Inherited from UIElement.)
Public eventLayoutUpdated (Inherited from FrameworkElement.)
Public eventLoadCompletedOccurs after the WebBrowser control has loaded content.
Public eventLoaded (Inherited from FrameworkElement.)
Public eventLostFocus (Inherited from UIElement.)
Public eventLostMouseCapture (Inherited from UIElement.)
Public eventManipulationCompleted (Inherited from UIElement.)
Public eventManipulationDelta (Inherited from UIElement.)
Public eventManipulationStarted (Inherited from UIElement.)
Public eventMouseEnter (Inherited from UIElement.)
Public eventMouseLeave (Inherited from UIElement.)
Public eventMouseLeftButtonDown (Inherited from UIElement.)
Public eventMouseLeftButtonUp (Inherited from UIElement.)
Public eventMouseMove (Inherited from UIElement.)
Public eventMouseWheel (Inherited from UIElement.)
Public eventNavigatedOccurs after the WebBrowser control successfully navigates.
Public eventNavigatingOccurs when the browser control is navigating, including from a redirect.
Public eventNavigationFailedOccurs after the WebBrowser control fails to navigate.
Public eventScriptNotifyOccurs when Javascript calls window.external.notify(<data>)
Public eventSizeChanged (Inherited from FrameworkElement.)
Public eventTap (Inherited from UIElement.)
Public eventTextInput (Inherited from UIElement.)
Public eventTextInputStart (Inherited from UIElement.)
Public eventTextInputUpdate (Inherited from UIElement.)
Public eventUnloaded (Inherited from FrameworkElement.)
Top
  NameDescription
Public Extension MethodGetCookiesReturns a CookieCollection of Cookie objects retrieved from the Source URI of a WebBrowser control. (Defined by WebBrowserExtensions.)
Top
  NameDescription
Public fieldStatic memberBasePropertyIdentifies the Base dependency property.
Public fieldStatic memberIsGeolocationEnabledPropertyIdentifies the IsGeolocationEnabled dependency property.
Public fieldStatic memberIsScriptEnabledPropertyIdentifies the IsScriptEnabled dependency property.
Public fieldStatic memberSourcePropertyIdentifies the Source dependency property.
Top
NoteNote:

multiple devices Memory allocated for a WebBrowserTask does not count toward total application memory use. If you are developing your application to target a 256-MB device, consider using a Web Browser Task instead of a WebBrowser control. This helps minimize your application's memory use, which is particularly important when your application runs on a 256-MB device. For more information, see Developing for 256-MB Devices and How to: Use the Web Browser Task for Windows Phone.

Windows Phone OS

Supported in: 7.1, 7.0

Windows Phone

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.