From 5a3a34d17e8590f5a2a3a73d9ed96787f5139002 Mon Sep 17 00:00:00 2001 From: xxe Date: Mon, 14 Nov 2022 16:19:04 +0800 Subject: [PATCH] 11 --- HKCardOUT/Views/AdWindow.xaml.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/HKCardOUT/Views/AdWindow.xaml.cs b/HKCardOUT/Views/AdWindow.xaml.cs index bba58c1..002a8b8 100644 --- a/HKCardOUT/Views/AdWindow.xaml.cs +++ b/HKCardOUT/Views/AdWindow.xaml.cs @@ -50,18 +50,17 @@ namespace HKCardOUT.Views public async void InitView2(string input) { - var height = this.content.RowDefinitions[1].ActualHeight - 10; - var width = this.content.ActualWidth - 9.5; + var height = this.content.RowDefinitions[1].ActualHeight - 12; + var width = this.content.ActualWidth - 11; input = input.Replace("style=\"width: 100%;\"", ""); StringBuilder sb = new StringBuilder(); sb.Append("" + input + ""); var html = sb.ToString(); await view2.EnsureCoreWebView2Async(null); - view2.CoreWebView2.Settings.AreDefaultContextMenusEnabled = true; - view2.CoreWebView2.Settings.AreDevToolsEnabled = true; + view2.CoreWebView2.Settings.AreDefaultContextMenusEnabled = false; + view2.CoreWebView2.Settings.AreDevToolsEnabled = false; view2.CoreWebView2.NavigateToString(html); - view2.CoreWebView2.Settings.IsStatusBarEnabled = false; } private void InitControl()