diff --git a/src/V2ex.Blazor/MainPage.xaml b/src/V2ex.Blazor/MainPage.xaml
index 90a152f..dd58727 100644
--- a/src/V2ex.Blazor/MainPage.xaml
+++ b/src/V2ex.Blazor/MainPage.xaml
@@ -9,7 +9,7 @@
-
+
diff --git a/src/V2ex.Blazor/MainPage.xaml.cs b/src/V2ex.Blazor/MainPage.xaml.cs
index 52000d8..20b3b38 100644
--- a/src/V2ex.Blazor/MainPage.xaml.cs
+++ b/src/V2ex.Blazor/MainPage.xaml.cs
@@ -2,9 +2,9 @@
public partial class MainPage : ContentPage
{
- public MainPage()
- {
- InitializeComponent();
+ public MainPage()
+ {
+ InitializeComponent();
// The SoftInput in the MainActivity.cs is not working, so we have to do it here.
@@ -16,5 +16,14 @@ public MainPage()
window.SetSoftInputMode(Android.Views.SoftInput.AdjustResize);
#endif
});
+
+
}
+
+
+ private void BlazorWebView_UrlLoading(object sender, Microsoft.AspNetCore.Components.WebView.UrlLoadingEventArgs e)
+ {
+
+ }
+
}
diff --git a/src/V2ex.Blazor/Pages/ReturnPage.xaml b/src/V2ex.Blazor/Pages/ReturnPage.xaml
index b3d1cf6..d6a0fc0 100644
--- a/src/V2ex.Blazor/Pages/ReturnPage.xaml
+++ b/src/V2ex.Blazor/Pages/ReturnPage.xaml
@@ -25,7 +25,8 @@
+ local:WebViewEvents.TitleChangeCommand="{Binding TitleChangeCommand}"
+ UrlLoading="BlazorWebView_UrlLoading">
diff --git a/src/V2ex.Blazor/Pages/ReturnPage.xaml.cs b/src/V2ex.Blazor/Pages/ReturnPage.xaml.cs
index cd66229..97a5323 100644
--- a/src/V2ex.Blazor/Pages/ReturnPage.xaml.cs
+++ b/src/V2ex.Blazor/Pages/ReturnPage.xaml.cs
@@ -12,4 +12,9 @@ public ReturnPage(string targetLocation)
{ "Url", targetLocation }
};
}
+
+ private void BlazorWebView_UrlLoading(object sender, Microsoft.AspNetCore.Components.WebView.UrlLoadingEventArgs e)
+ {
+ e.UrlLoadingStrategy = Microsoft.AspNetCore.Components.WebView.UrlLoadingStrategy.OpenInWebView;
+ }
}
\ No newline at end of file