rename from Pixiview to Gallery
This commit is contained in:
39
Gallery/Login/HybridWebView.cs
Executable file
39
Gallery/Login/HybridWebView.cs
Executable file
@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using Xamarin.Essentials;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Gallery.Login
|
||||
{
|
||||
public class HybridWebView : WebView
|
||||
{
|
||||
public static readonly BindableProperty UriProperty = BindableProperty.Create(
|
||||
nameof(Uri),
|
||||
typeof(string),
|
||||
typeof(HybridWebView));
|
||||
public static readonly BindableProperty UserAgentProperty = BindableProperty.Create(
|
||||
nameof(UserAgent),
|
||||
typeof(string),
|
||||
typeof(HybridWebView));
|
||||
|
||||
public event EventHandler LoginHandle;
|
||||
|
||||
public string Uri
|
||||
{
|
||||
get => (string)GetValue(UriProperty);
|
||||
set => SetValue(UriProperty, value);
|
||||
}
|
||||
public string UserAgent
|
||||
{
|
||||
get => (string)GetValue(UserAgentProperty);
|
||||
set => SetValue(UserAgentProperty, value);
|
||||
}
|
||||
|
||||
public void OnLoginHandle()
|
||||
{
|
||||
if (LoginHandle != null)
|
||||
{
|
||||
MainThread.BeginInvokeOnMainThread(() => LoginHandle(this, EventArgs.Empty));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user