-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
WebViewSource.cs
33 lines (28 loc) · 963 Bytes
/
WebViewSource.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#nullable disable
using System;
using System.ComponentModel;
namespace Microsoft.Maui.Controls
{
/// <include file="../../docs/Microsoft.Maui.Controls/WebViewSource.xml" path="Type[@FullName='Microsoft.Maui.Controls.WebViewSource']/Docs/*" />
public abstract class WebViewSource : BindableObject, IWebViewSource
{
public static implicit operator WebViewSource(Uri url)
{
return new UrlWebViewSource { Url = url?.AbsoluteUri };
}
public static implicit operator WebViewSource(string url)
{
return new UrlWebViewSource { Url = url };
}
protected void OnSourceChanged()
{
EventHandler eh = SourceChanged;
if (eh != null)
eh(this, EventArgs.Empty);
}
/// <include file="../../docs/Microsoft.Maui.Controls/WebViewSource.xml" path="//Member[@MemberName='Load']/Docs/*" />
[EditorBrowsable(EditorBrowsableState.Never)]
public abstract void Load(IWebViewDelegate renderer);
internal event EventHandler SourceChanged;
}
}