-
-
Save kypflug/14e0738c80940bbb80babd626de7eef4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Toolkit.Win32.UI.Controls.WinForms; | |
public partial class Form1 : Form | |
{ | |
public Form1() | |
{ | |
InitializeComponent(); | |
// Initialize WebView and add it to the Window's controls | |
var wvc = new WebView(); | |
((ISupportInitialize)wvc).BeginInit(); | |
wvc.Dock = DockStyle.Fill; | |
Controls.Add(wvc); | |
((ISupportInitialize)wvc).EndInit(); | |
// You can also use the Source property | |
wvc.Navigate(new Uri("https://www.microsoft.com")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment