Skip to content

A full featured web-browser built using C# and CefSharp

License

Notifications You must be signed in to change notification settings

sharpbrowser/SharpBrowser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Repository files navigation

SharpBrowser

SharpBrowser is the fastest and most full-featured open source C# web browser there is! Slightly faster than Google Chrome when rendering web pages due to lightweight CEF renderer. We compared every available .NET browsing engine and finally settled on the high-performance CefSharp. Released under the permissive MIT license.

Features

SharpBrowser

Modern

  • HTML5, CSS3, JS, Video, PDF, WebGL, WebAssembly, WebRTC, WebMIDI
  • Tabbed browsing with website favicons
  • Address bar (also opens Google or any search engine)
  • Back, Forward, Stop, Refresh, Home, Menu button
  • Print and Print to PDF
  • Search bar (also highlights all instances)
  • File downloads and download manager
  • View online & offline webpages
  • Fullscreen mode

Smart

  • Hotkeys for all features
  • Saves open tabs and resumes the browsing session when reopened
  • Saves cookies and web cache in the AppData folder
  • Saves application settings in a custom JSON file
  • Saves favicons in a disk cache for fast reuse
  • Developer tools
  • Web app permission handling
  • Popups open in new tabs

Extensible

Hotkeys

HotkeysFunction
Ctrl+MouseWheelZoom in/out
Ctrl+TAdd a new tab
Ctrl+WClose active tab
Ctrl+MiddleClickClose Tab
F5Refresh active tab
F11Toggle fullscreen
F12Open developer tools
Ctrl+TabSwitch to the next tab
Ctrl+Shift+TabSwitch to the previous tab
Ctrl+FOpen search bar (Enter to find next, Esc to close)
Ctrl+PPrint
Ctrl+Shift+PPrint to PDF

Documentation

System requirements

  • You need .NET 8 on Windows 64-bit.

  • You need VC++ 2019 Runtime (64-bit)

  • You might need VC++ 2017 Runtime (64-bit)

  • You need to install the version of VC++ Runtime that CEFSharp needs. As per our CefSharp version, according to this, we need the above versions

Customization

  • To customize the browser branding, name, URL, default search engine, default proxy, modify the BrowserConfig class.

  • To customize the application icon, change sharpbrowser.ico inside the Resources folder.

  • To customize the tab size and tab colors, modify the BrowserTabStyle class.

  • To enable or disable Web Camera, Microphone, Javascript, WebGL, WebRTC, WebMIDI, LocalStorage, modify the BrowserConfig class.

  • To register hotkeys for your own commands, modify the HotkeyManager class.

  • To register your own commands into the main menu, open the form designed for MainForm and click the MainMenu object. Add IconMenuItem objects into that menu.

  • To register your own commands into the page context-menu, modify ContextMenuHandler.OnBeforeContextMenu function, and then implement the command inside ContextMenuHandler.OnContextMenuCommand.

  • To setup how web app permissions are handled, modify PermissionHandler.OnShowPermissionPrompt (some flags are already inside BrowserConfig and can easily be changed).

  • To add new settings saved in the JSON file, simply call ConfigManager.Get* and ConfigManager.Set anywhere in your code. It will save into the file automatically.

Code

  • SharpBrowser uses CefSharp 134 and is built on NET.
  • SharpBrowser only supports Windows x64 platform.
  • MainForm.cs - main web browser UI and related functionality
  • Managers - classes that manage various types of browsing functionality, like settings, downloads and hotkeys
  • Handlers - various handlers that we have registered with CefSharp that enable deeper integration between us and CefSharp
  • bin - Binaries are included in the bin folder due to the complex CefSharp setup required. Don't empty this folder.
  • bin/storage - HTML and JS required for downloads manager and custom error pages

Screenshots

Apple.com
Google Maps
WebGL(test)
PDF Viewer
Web Camera(test)
WebMIDI(test)
WebAssembly(test)
YouTube
Search Bar
Main Menu
Downloads Tab
Developer Tools
Custom Error Page 1
Custom Error Page 2

About

A full featured web-browser built using C# and CefSharp

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Contributors 7