WPF replaces Web controls with Cefsharp

Source: Internet
Author: User

There is a need to use WPF to place buttons on the map and be transparent, but if you use WPF's WebBrowser, the compatibility is not very good, although the implementation of placing controls on them, but not transparent.

Read a few blog, some people say is because of the compatibility of IE, change a train of thought, do not use IE browser good? This is found on the Internet Cefsharp control, which is a Google control, specific content can refer to the blog

Http://www.cnblogs.com/TianFang/p/4573324.html now introduces the installation method of Cefsharp

First: Open the VS2013----Tool-----Library Package Manager-----Package Manager Console-----pm> install-package cefsharp.wpf-version 37.0.0

I am using the 37 version, you can find the appropriate version in https://www.nuget.org/packages/CefSharp.Wpf/37.0.0, note that some versions require higher. NET. The use of the process is also very simple, the source code is as follows

Private void Window_Loaded (object  sender, RoutedEventArgs e)        {            varnew  Cefsharp.cefsettings ();            CefSharp.Cef.Initialize (setting);//This function may be followed by a two            parameter varnew  CefSharp.Wpf.ChromiumWebBrowser ();             " www.baidu.com " ;            GRID_WEB.CHILDREN.ADD (WebView);                 }

Demo

WPF replaces Web controls with Cefsharp

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.