Skip to content

Commit 182bcb9

Browse files
committed
Update README.WPF.md
Rename WebView to ChromiumWebBrowser and make a few minor adjustments to show a minimal CefSharp3 implementation.
1 parent 60f8d3f commit 182bcb9

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

README.WPF.md

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ CefSharp is based on CEF (Chromium Embeddable Framework), which is composed of a
66

77
This is done automatically by the CefSharp.Wpf NuGet package (or the packages it depend on). However, it is only possible to copy these files into *either* the Debug or Release target of your project. Because it is the default when creating a new project, and the target which is normally used when developing .NET applications, I have chosen to place them in the bin\Debug folder for now. This means that if you want to run your application in Release mode, you need to copy these files from bin\Debug to bin\Release for the moment.
88

9-
To be able to use CefSharp.Wpf, you basically just have to add a WebView like this:
9+
To be able to use CefSharp.Wpf, you basically just have to add a ChromiumWebBrowser like this:
1010

1111
``` xml
1212
<Window x:Class="WpfApplication3.MainWindow"
1313
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
1414
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
1515
xmlns:cefSharp="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf" Title="MainWindow" Height="350" Width="525">
1616
<Grid>
17-
<cefSharp:WebView x:Name="WebView" />
17+
<cefSharp:ChromiumWebBrowser x:Name="Browser" Address="http://www.google.com.au" />
1818
</Grid>
1919
</Window>
2020
```
@@ -28,23 +28,7 @@ To be able to use CefSharp.Wpf, you basically just have to add a WebView like th
2828
{
2929
InitializeComponent();
3030

31-
WebView.PropertyChanged += OnWebViewPropertyChanged;
32-
3331
Cef.Initialize(new Settings());
3432
}
35-
36-
private void OnWebViewPropertyChanged(object sender, PropertyChangedEventArgs e)
37-
{
38-
switch (e.PropertyName)
39-
{
40-
case "IsBrowserInitialized":
41-
if (WebView.IsBrowserInitialized)
42-
{
43-
WebView.Load("http://10.211.55.2:42000");
44-
}
45-
46-
break;
47-
}
48-
}
4933
}
5034
```

0 commit comments

Comments
 (0)