Skip to content

Instantly share code, notes, and snippets.

@caiorss
Forked from mariuz/monobrowser.cs
Created March 10, 2017 17:33
Show Gist options
  • Save caiorss/76e336223bc77f1bdb07140815a8a59a to your computer and use it in GitHub Desktop.
Save caiorss/76e336223bc77f1bdb07140815a8a59a to your computer and use it in GitHub Desktop.
using System;
using Gtk;
using WebKit;
namespace monobrowser {
class coolbrowser {
public static void Main () {
Application.Init ();
Window window = new Window ("a browser in 13 lines...");
window.SetDefaultSize(800,600);
window.Destroyed += delegate (object sender, EventArgs e) {
Application.Quit ();
};
ScrolledWindow scrollWindow = new ScrolledWindow ();
WebView webView = new WebView ();
webView.Open ("http://mono-project.com");
scrollWindow.Add (webView);
window.Add (scrollWindow);
window.ShowAll ();
Application.Run ();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment