This topic has not yet been rated - Rate this topic

WebBrowser Class

Windows Phone

March 22, 2012

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

System.Object
  System.Windows.DependencyObject
    System.Windows.UIElement
      System.Windows.FrameworkElement
        System.Windows.Controls.Control
          Microsoft.Phone.Controls.WebBrowser

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.

  Name Description
Public method WebBrowser Initializes a new instance of the WebBrowser class.
Top
  Name Description
Public property ActualHeight (Inherited from FrameworkElement.)
Public property ActualWidth (Inherited from FrameworkElement.)
Public property AllowDrop (Inherited from UIElement.)
Public property Background (Inherited from Control.)
Public property Base Sets the base directory within isolated storage that is used to resolve relative references within the WebBrowser control.
Public property BorderBrush (Inherited from Control.)
Public property BorderThickness (Inherited from Control.)
Public property CacheMode (Inherited from UIElement.)
Public property Clip (Inherited from UIElement.)
Public property Cursor (Inherited from FrameworkElement.)
Public property DataContext (Inherited from FrameworkElement.)
Protected property DefaultStyleKey (Inherited from Control.)
Public property DesiredSize (Inherited from UIElement.)
Public property Dispatcher (Inherited from DependencyObject.)
Public property FlowDirection (Inherited from FrameworkElement.)
Public property FontFamily (Inherited from Control.)
Public property FontSize (Inherited from Control.)
Public property FontStretch (Inherited from Control.)
Public property FontStyle (Inherited from Control.)
Public property FontWeight (Inherited from Control.)
Public property Foreground (Inherited from Control.)
Public property Height (Inherited from FrameworkElement.)
Public property HorizontalAlignment (Inherited from FrameworkElement.)
Public property HorizontalContentAlignment (Inherited from Control.)
Public property IsEnabled (Inherited from Control.)
Public property IsGeolocationEnabled Determines whether a website that is hosted in the WebBrowser control can use location services on the device.
Public property IsHitTestVisible (Inherited from UIElement.)
Public property IsScriptEnabled Enables 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 property IsTabStop (Inherited from Control.)
Public property Language (Inherited from FrameworkElement.)
Public property Margin (Inherited from FrameworkElement.)
Public property MaxHeight (Inherited from FrameworkElement.)
Public property MaxWidth (Inherited from FrameworkElement.)
Public property MinHeight (Inherited from FrameworkElement.)
Public property MinWidth (Inherited from FrameworkElement.)
Public property Name (Inherited from FrameworkElement.)
Public property Opacity (Inherited from UIElement.)
Public property OpacityMask (Inherited from UIElement.)
Public property Padding (Inherited from Control.)
Public property Parent (Inherited from FrameworkElement.)
Public property Projection (Inherited from UIElement.)
Public property RenderSize (Inherited from UIElement.)
Public property RenderTransform (Inherited from UIElement.)
Public property RenderTransformOrigin (Inherited from UIElement.)
Public property Resources (Inherited from FrameworkElement.)
Public property Source Gets or sets the URI location of the WebBrowser control.
Public property Style (Inherited from FrameworkElement.)
Public property TabIndex (Inherited from Control.)
Public property TabNavigation (Inherited from Control.)
Public property Tag (Inherited from FrameworkElement.)
Public property Template (Inherited from Control.)
Public property Triggers (Inherited from FrameworkElement.)
Public property UseLayoutRounding (Inherited from UIElement.)
Public property VerticalAlignment (Inherited from FrameworkElement.)
Public property VerticalContentAlignment (Inherited from Control.)
Public property Visibility (Inherited from UIElement.)
Public property Width (Inherited from FrameworkElement.)
Top
  Name Description
Public method AddHandler (Inherited from UIElement.)
Public method ApplyTemplate (Inherited from Control.)
Public method Arrange (Inherited from UIElement.)
Protected method ArrangeOverride (Inherited from FrameworkElement.)
Public method CaptureMouse (Inherited from UIElement.)
Public method CheckAccess (Inherited from DependencyObject.)
Public method ClearValue (Inherited from DependencyObject.)
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method FindName (Inherited from FrameworkElement.)
Public method Focus (Inherited from Control.)
Public method GetAnimationBaseValue (Inherited from DependencyObject.)
Public method GetBindingExpression (Inherited from FrameworkElement.)
Public method GetHashCode (Inherited from Object.)
Protected method GetTemplateChild (Inherited from Control.)
Public method GetType (Inherited from Object.)
Public method GetValue (Inherited from DependencyObject.)
Public method InvalidateArrange (Inherited from UIElement.)
Public method InvalidateMeasure (Inherited from UIElement.)
Public method InvokeScript(String) Executes a scripting function defined in the currently loaded document.
Public method InvokeScript(String, String[]) Executes a scripting function defined in the currently loaded document, and passes the function an array of string parameters.
Public method Measure (Inherited from UIElement.)
Protected method MeasureOverride (Inherited from FrameworkElement.)
Protected method MemberwiseClone (Inherited from Object.)
Public method Navigate(Uri) Initiates a navigate request to the provided URI.
Public method Navigate(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 method NavigateToString Injects an HTML string into the web browser control for rendering.
Public method OnApplyTemplate Do not use this method. It is unsupported. (Overrides FrameworkElement.OnApplyTemplate().)
Protected method OnCreateAutomationPeer (Inherited from UIElement.)
Protected method OnDoubleTap (Inherited from Control.)
Protected method OnDragEnter (Inherited from Control.)
Protected method OnDragLeave (Inherited from Control.)
Protected method OnDragOver (Inherited from Control.)
Protected method OnDrop (Inherited from Control.)
Protected method OnGotFocus (Inherited from Control.)
Protected method OnHold (Inherited from Control.)
Protected method OnKeyDown (Inherited from Control.)
Protected method OnKeyUp (Inherited from Control.)
Protected method OnLostFocus (Inherited from Control.)
Protected method OnLostMouseCapture (Inherited from Control.)
Protected method OnManipulationCompleted (Inherited from Control.)
Protected method OnManipulationDelta (Inherited from Control.)
Protected method OnManipulationStarted (Inherited from Control.)
Protected method OnMouseEnter (Inherited from Control.)
Protected method OnMouseLeave (Inherited from Control.)
Protected method OnMouseLeftButtonDown (Inherited from Control.)
Protected method OnMouseLeftButtonUp (Inherited from Control.)
Protected method OnMouseMove (Inherited from Control.)
Protected method OnMouseRightButtonDown (Inherited from Control.)
Protected method OnMouseRightButtonUp (Inherited from Control.)
Protected method OnMouseWheel (Inherited from Control.)
Protected method OnTap (Inherited from Control.)
Protected method OnTextInput (Inherited from Control.)
Protected method OnTextInputStart (Inherited from Control.)
Protected method OnTextInputUpdate (Inherited from Control.)
Public method ReadLocalValue (Inherited from DependencyObject.)
Public method ReleaseMouseCapture (Inherited from UIElement.)
Public method RemoveHandler (Inherited from UIElement.)
Public method SaveToString Returns a string containing the HTML content of the webpage.
Public method SetBinding (Inherited from FrameworkElement.)
Public method SetValue (Inherited from DependencyObject.)
Public method ToString (Inherited from Object.)
Public method TransformToVisual (Inherited from UIElement.)
Public method UpdateLayout (Inherited from UIElement.)
Top
  Name Description
Public event BindingValidationError (Inherited from FrameworkElement.)
Public event DoubleTap (Inherited from UIElement.)
Public event GotFocus (Inherited from UIElement.)
Public event Hold (Inherited from UIElement.)
Public event IsEnabledChanged (Inherited from Control.)
Public event KeyDown (Inherited from UIElement.)
Public event KeyUp (Inherited from UIElement.)
Public event LayoutUpdated (Inherited from FrameworkElement.)
Public event LoadCompleted Occurs after the WebBrowser control has loaded content.
Public event Loaded (Inherited from FrameworkElement.)
Public event LostFocus (Inherited from UIElement.)
Public event LostMouseCapture (Inherited from UIElement.)
Public event ManipulationCompleted (Inherited from UIElement.)
Public event ManipulationDelta (Inherited from UIElement.)
Public event ManipulationStarted (Inherited from UIElement.)
Public event MouseEnter (Inherited from UIElement.)
Public event MouseLeave (Inherited from UIElement.)
Public event MouseLeftButtonDown (Inherited from UIElement.)
Public event MouseLeftButtonUp (Inherited from UIElement.)
Public event MouseMove (Inherited from UIElement.)
Public event MouseWheel (Inherited from UIElement.)
Public event Navigated Occurs after the WebBrowser control successfully navigates.
Public event Navigating Occurs when the browser control is navigating, including from a redirect.
Public event NavigationFailed Occurs after the WebBrowser control fails to navigate.
Public event ScriptNotify Occurs when Javascript calls window.external.notify(<data>)
Public event SizeChanged (Inherited from FrameworkElement.)
Public event Tap (Inherited from UIElement.)
Public event TextInput (Inherited from UIElement.)
Public event TextInputStart (Inherited from UIElement.)
Public event TextInputUpdate (Inherited from UIElement.)
Public event Unloaded (Inherited from FrameworkElement.)
Top
  Name Description
Public Extension Method GetCookies Returns a CookieCollection of Cookie objects retrieved from the Source URI of a WebBrowser control. (Defined by WebBrowserExtensions.)
Top
  Name Description
Public field Static member BaseProperty Identifies the Base dependency property.
Public field Static member IsGeolocationEnabledProperty Identifies the IsGeolocationEnabled dependency property.
Public field Static member IsScriptEnabledProperty Identifies the IsScriptEnabled dependency property.
Public field Static member SourceProperty Identifies the Source dependency property.
Top
Note Note:

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)