Fabulous API
Documentation
2.0
2.0
  • Welcome
  • Xamarin.Forms
    • AnyView
    • Application
    • Element
    • NavigableElement
    • VisualElement
    • View
    • Controls
      • ActivityIndicator
      • BoxView
      • Button
      • CheckBox
      • DatePicker
      • Editor
      • Entry
      • FormattedLabel
      • ImageButton
      • Image
      • IndicatorView
      • InputView
      • Label
      • Picker
      • ProgressBar
      • RadioButton
      • SearchBar
      • Slider
      • Span
      • Stepper
      • Switch
      • TimePicker
      • WebView
    • Collections
      • CarouselView
      • CollectionView
      • ItemsView
      • ListView
    • Layouts
      • Layout
      • TemplatedView
  • .NET MAUI
    • AnyView
    • Application
    • Element
    • NavigableElement
    • VisualElement
    • View
    • Controls
      • ActivityIndicator
      • BoxView
      • Button
      • CheckBox
      • DatePicker
      • Editor
      • Entry
      • FormattedLabel
      • ImageButton
      • Image
      • IndicatorView
      • InputView
      • Label
      • Picker
      • ProgressBar
      • RadioButton
      • SearchBar
      • Slider
      • Span
      • Stepper
      • Switch
      • TimePicker
      • WebView
    • Collections
      • CarouselView
      • CollectionView
      • ItemsView
      • ListView
    • Layouts
      • Layout
      • TemplatedView
  • Avalonia
    • AnyView
    • Application
    • RenderOptions
    • Animatable
    • StyledElement
    • Transform
    • Visual
    • Layoutable
    • InputElement
    • DragDrop
    • FlyoutBase
    • PopupFlyoutBase
    • Control
    • Decorator
    • TemplatedControl
    • ContentControl
    • Spinner
    • TopLevel
    • TextElement
    • ItemsControl
    • SelectingItemsControl
    • MenuBase
    • WindowBase
    • Styling
      • KeyFrame
      • Animation
      • Transition
      • Style
    • Media
      • Transforms
        • Transform
        • MatrixTransform
        • SkewTransform
        • RotateTransform
        • TranslateTransform
        • ScaleTransform
        • Rotate3DTransform
        • TransformGroup
      • Brushes
        • Brush
        • TileBrush
        • SolidColorBrush
        • VisualBrush
        • ImageBrush
        • DrawingBrush
        • GradientStop
        • GradientBrush
        • ConicGradientBrush
        • LinearGradientBrush
        • RadialGradientBrush
      • PathSegments
        • PathSegment
        • ArcSegment
        • BezierSegment
        • PolyLineSegment
        • QuadraticBezierSegment
        • PathFigure
      • Geometries
        • Geometry
        • LineGeometry
        • EllipseGeometry
        • RectangleGeometry
        • PolylineGeometry
        • PathGeometry
        • CombinedGeometry
        • GeometryGroup
      • DashStyle
      • Pen
      • Drawing
      • Effects
Powered by GitBook
On this page
  • Constructors
  • Properties
  • Events
  • Usages
Edit on GitHub
  1. .NET MAUI
  2. Controls

WebView

PreviousTimePickerNextCollections

Last updated 1 year ago

Inheritance: -> -> -> -> Xamarin.Forms documentation: WebView /

For details on how the control actually works, please refer to the

Constructors

Constructors
Description

WebView(source: WebViewSource)

Define a WebView widget with a WebViewSource

WebView(html: string, ?baseUrl: string)

Define a WebView widget with html content and a base URL for all links inside

WebView(uri: Uri)

Define a WebView with a URI

WebView(url: string)

Define a WebView with a URL as string

Properties

Properties
Description

canGoBack(value: bool)

Sets if the user can navigate back

canGoForward(value: bool)

Sets if the user can navigate forward

cookies(value: CookieContainer)

Sets the cookies

enableZoomControls(value: bool)

Sets if the zoom controls are enabled

displayZoomControls(value: bool)

Sets if the zoom controls are shown on the screen

reference(value: ViewRef<WebView>)

Sets a ViewRef instance to retrieve the Xamarin.Forms.WebView instance associated to this widget

Events

Properties
Description

onNavigating(onNavigating: WebNavigatingEventArgs -> ‘msg)

Sets the event listener for the navigating event

onNavigated(onNavigated: WebNavigatedEventArgs -> ‘msg)

Sets the event listener for the navigated event

onReloadRequested(onReloadRequested: ‘msg)

Sets the event listener for the reload requested event

Usages

let cookies = CookieContainer()

WebView("https://fabulous.dev")
    .canGoBack(false) 
    .canGoForward(true)
    .cookies(cookies)
    .enableZoomControls(true)
    .displayZoomControls(false)
    .onNavigating(NavigatingMsg)
    .onNavigated(NavigatedMsg)
    .onReloadRequested(ReloadedMsg)

Get access to the underlying Xamarin.Forms.WebView

let webViewRef = ViewRef<WebView>()

WebView("https://fabulous.dev")
    .reference(webViewRef)
Element
NavigableElement
VisualElement
View
View
API
Guide
Xamarin.Forms documentation