From 48e2c06649d1707f30ee8e0e16a52d281eb760ca Mon Sep 17 00:00:00 2001 From: lytico Date: Tue, 20 Jul 2021 01:24:53 +0200 Subject: [PATCH] Samples.csproj: WebviewSection.cs: track api changes for WebView2 --- .../Sections/Widgets/WebviewSection.cs | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/Source/Samples/Sections/Widgets/WebviewSection.cs b/Source/Samples/Sections/Widgets/WebviewSection.cs index 22b0e57c2..7e1ede642 100644 --- a/Source/Samples/Sections/Widgets/WebviewSection.cs +++ b/Source/Samples/Sections/Widgets/WebviewSection.cs @@ -31,29 +31,20 @@ namespace Samples Hexpand = true }; - webView.LoadString( - $"This is a {nameof(WebView)} showing html text", - "text/html", "UTF-8", null - ); - + webView.LoadHtml($"This is a {nameof(WebView)} showing html text"); return ($"{nameof(WebView)} show html text:", webView); } public (string, Widget) ShowUri() { - var webView = new WebView {ViewMode = WebViewViewMode.Floating}; - - var scroll = new ScrolledWindow { - Child = webView, - Vexpand = true, - Hexpand = true, - PropagateNaturalHeight = true, - PropagateNaturalWidth = true + var webView = new WebView { + Vexpand = true, + Hexpand = true, }; webView.LoadUri("https://github.com/GtkSharp/GtkSharp#readme"); - return ($"{nameof(WebView)} show uri:", scroll); + return ($"{nameof(WebView)} show uri:", webView); } }