Commit Graph

26 Commits

Author SHA1 Message Date
amaitland d5d0cb9945 WinForms Example - Focus browser after loading URL from address bar
- Extend IWinFormsChromiumWebBrowser to make it easier to access CanSelect/Select methods
- Update example to call Select() after LoadUrl call

Resolves #4965
2025-04-18 07:14:10 +10:00
Alex Maitland 5cab3c23ea WinForms Example - Make DPI Aware
- WinForms Example is now DPI aware using https://docs.microsoft.com/en-us/dotnet/desktop/winforms/high-dpi-support-in-windows-forms?view=netframeworkdesktop-4.8
  There's a mistake in the MS Docs which was already reported at https://github.com/dotnet/docs-desktop/issues/1485
- Toolstrip layout updated slightly, could use some more minor tweaks to better calculate size

Resolves #1543
2022-08-08 13:37:17 +10:00
Alex Maitland 929470e5bc WinForms Example - Remove MultiFormFocusHandler
- No longer needed as it's identical to the DefaultFocusHandler implementation.
- Minor code cleanup, no longer need to pass through multithreadedmessageloop param
2021-07-29 11:11:39 +10:00
Alex Maitland f48c6567ea WinForms Example - Remove redundant code
The Focus handler when multithreaded message loop = true is already null as
we check if running on CEF UI Thread before creating the instance in the ChromiumWebBrowser.OnAfterBrowserCreated
2021-07-27 13:06:49 +10:00
Konstantin Preißer 462bc747bd Add support for Windows ARM64 to CefSharp.NETCore packages (#3359)
* Add support for Windows ARM64 for the NETCore packages.

Note: .NET 5.0 or higher is required to build a WinForms/WPF application for win-arm64.

Fixes cefsharp/CefSharp#2944

* PR feedback: Remove "WIN32" define as it is already defined by minwindef.h.

* PR feedback: Switch the CefSharp.*.Example.netcore and CefSharp.Test.netcore projects from cef.redist to chromiumembeddedframework.runtime.

Note: These projects are excluded for build when platform is 'arm64', as otherwise the build fails as WinForms and WPF are not yet available for ARM64 in .NET 5.0.

* Follow-Up: Update path to CefSharp.Test.dll.

* PR feedback: Also use RuntimeInformation for the .NET Framework example projects.

* PR feedback:
- Remove copying of CefRedist files in CefSharp.AfterBuild.targets which is no longer needed.
- Update .vsconfig to include the VC ARM64 build tools.
2021-04-01 17:27:48 +10:00
Konstantin Preißer 5e89f71a44 Add new projects targeting .NET Core 3.1 (#3181)
* Add .NET Core 3.1 projects for CefSharp, CefSharp.Core, CefSharp.BrowserSubprocess.Core, CefSharp.WinForms, CefSharp.Wpf, CefSharp.OffScreen.

Contributes to CefSharp#2796

* - Remove dependencies to "opengl32.lib" and "glu32.lib" which aren't available for ARM64 and don't seem to be needed.
- Clean up project files.

* Switch project CefSharp.netcore.csproj to AnyCPU as it doesn't require different builds for each platform.

* Remove WindowsTargetPlatformVersion property as that is declared in CefSharp.props.

* Use "bin.netcore" and "obj.netcore" as [intermediate] output path for the .NET Core projects, to allow side-by-side builds with the .NET Framework projects.

* Output documentation files.

* Add CefSharp.Example.netcore and CefSharp.WinForms.Example.netcore.

* Follow-up: Remove properties from the example projects that are also not used in the corresponding .NET Framework projects.
2020-07-23 15:21:14 +10:00
amaitland e4312760ce API Change - IJavascriptObjectRepository.Register remove isAsync default param
**BREAKING CHANGE**

- You must now explicitly specify the `isAsync` param.
- Add additional xml doc comment regarding .Net Core and using only isAsync = true

The isAsync = false option (sync binding) requires WCF which isn't available on .Net core, remove the default value so you are forced to specify an option and in the process hopefully read the documentation.

For those who previously hadn't provided a param then simply pass in false for the third argument.
e.g.
browser.JavascriptObjectRepository.Register("bound", new BoundObject(), false);

Resolves #3016
2020-01-21 08:39:23 +10:00
amaitland fdc02076ce WinForms - Demo workaround for activation issue when showing two browser forms
When there are two forms that contain browser instances shown at the same time they rapidly switch between
the two windows.

Issue #2928
2019-10-29 19:26:50 +10:00
amaitland 302f5b2c83 WinForms Example - Improve Cef.DoMessageLoopWork examples
Change WinFormsBrowserProcessHandler to use a WinForms timer so it's Diposed when the Form is
switch it to using 60fps
2019-06-02 20:35:31 +10:00
amaitland d434050a33 SimpleBrowserForm - Set browser.FocusHandler = null; when not using multiThreadedMessageLoop 2019-05-15 09:02:08 +10:00
amaitland 4f71295941 CefSharp.Example - Move example classes into handlers/javascriptbinding folders/namespaces
Basic code cleanup
2018-10-29 16:21:42 +10:00
Chris 30ee538ce0 Added EditorConfig (#2514) 2018-09-17 00:46:21 +02:00
Chris bef5dd37c4 Maintenance - Fixed formatting, file encoding, and copyright year (#2504)
* Applied formatting

* Fixed file encoding + Updated copyright year

* Updated License

* Fixed more file encoding

* Copyright notice now shows the year the file was created
2018-09-10 10:41:13 +10:00
amaitland 679cdb5b11 JSB ResolveObject WcfEnabled = false throw exception if attempt to register sync object
Update the examples to use newer Register method as Legacy options is disabled by default
2018-01-22 11:02:23 +10:00
Chris cd934267c6 Updated copyright year and made sure it used same format everywhere (#1966) 2017-03-06 08:44:37 +10:00
amaitland bae3c28e92 Update copyright to 2016 2016-01-11 14:11:30 +10:00
rassilon 7128e40fd1 It's time for copyright updates again. Yay!
Throw in a couple of tab containing files for good measure.
Evil tabs, evil I say.
2015-04-25 02:45:21 -04:00
amaitland d55ea0c90e Rename NavStateChanged to LoadingStateChanged 2015-04-08 11:09:37 +10:00
amaitland 6e30c097dd Another attempt at getting focus to work correctly - Simplest approach possible this time 2015-01-29 20:58:47 +10:00
amaitland 56e9b9db37 Remove hack for #522 that's no longer required 2014-12-12 13:17:34 +10:00
amaitland 0efff78f0d Update examples to call RegisterJsObject in constructor 2014-12-12 13:16:59 +10:00
amaitland 74c9e17493 Example of user land fix for #522 2014-11-12 16:33:37 +10:00
amaitland bb27ea3c48 First attempt at a fix for #522 - this is a hack.
Keeping track for future reference
2014-10-30 14:46:26 +10:00
amaitland 3c1881d872 Refactor browser creation out into a method 2014-10-21 22:08:05 +10:00
amaitland 53e6dcb95d Prevent window redraw when resizing as per http://stackoverflow.com/questions/2353381/prevent-window-redraw-when-resizing-c-sharp-windows-forms 2014-10-21 21:50:55 +10:00
amaitland 295a9e0e87 Import Form from MinimalExample and rename to SimpleBrowserForm (needed for testing of #514) 2014-10-21 20:44:27 +10:00