diff --git a/CefSharp.MinimalExample.OffScreen/CefSharp.MinimalExample.OffScreen.csproj b/CefSharp.MinimalExample.OffScreen/CefSharp.MinimalExample.OffScreen.csproj index 0760a05..48a91c5 100644 --- a/CefSharp.MinimalExample.OffScreen/CefSharp.MinimalExample.OffScreen.csproj +++ b/CefSharp.MinimalExample.OffScreen/CefSharp.MinimalExample.OffScreen.csproj @@ -1,7 +1,9 @@  - - + + + + Debug @@ -16,7 +18,7 @@ ..\ - ddb3b40c + 050f11be true @@ -77,8 +79,6 @@ - - - - + + \ No newline at end of file diff --git a/CefSharp.MinimalExample.OffScreen/packages.config b/CefSharp.MinimalExample.OffScreen/packages.config index 5ba91ab..a0fd921 100644 --- a/CefSharp.MinimalExample.OffScreen/packages.config +++ b/CefSharp.MinimalExample.OffScreen/packages.config @@ -1,7 +1,7 @@  - - - - + + + + \ No newline at end of file diff --git a/CefSharp.MinimalExample.WinForms/BrowserForm.Designer.cs b/CefSharp.MinimalExample.WinForms/BrowserForm.Designer.cs index 041130a..6bfa4aa 100644 --- a/CefSharp.MinimalExample.WinForms/BrowserForm.Designer.cs +++ b/CefSharp.MinimalExample.WinForms/BrowserForm.Designer.cs @@ -39,7 +39,8 @@ this.goButton = new System.Windows.Forms.ToolStripButton(); this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.showDevToolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripContainer.ContentPanel.SuspendLayout(); this.toolStripContainer.TopToolStripPanel.SuspendLayout(); this.toolStripContainer.SuspendLayout(); @@ -152,11 +153,19 @@ // fileToolStripMenuItem // this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.showDevToolsToolStripMenuItem, this.exitToolStripMenuItem}); this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); this.fileToolStripMenuItem.Text = "File"; - // + // + // showDevToolsToolStripMenuItem + // + this.showDevToolsToolStripMenuItem.Name = "showDevToolsToolStripMenuItem"; + this.showDevToolsToolStripMenuItem.Size = new System.Drawing.Size(154, 22); + this.showDevToolsToolStripMenuItem.Text = "Show DevTools"; + this.showDevToolsToolStripMenuItem.Click += new System.EventHandler(this.ShowDevToolsMenuItemClick); + // // exitToolStripMenuItem // this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; @@ -203,6 +212,7 @@ private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; private System.Windows.Forms.Label outputLabel; private System.Windows.Forms.Label statusLabel; + private System.Windows.Forms.ToolStripMenuItem showDevToolsToolStripMenuItem; } } \ No newline at end of file diff --git a/CefSharp.MinimalExample.WinForms/BrowserForm.cs b/CefSharp.MinimalExample.WinForms/BrowserForm.cs index e291a94..1d6312d 100644 --- a/CefSharp.MinimalExample.WinForms/BrowserForm.cs +++ b/CefSharp.MinimalExample.WinForms/BrowserForm.cs @@ -149,5 +149,10 @@ namespace CefSharp.MinimalExample.WinForms browser.Load(url); } } + + private void ShowDevToolsMenuItemClick(object sender, EventArgs e) + { + browser.ShowDevTools(); + } } } diff --git a/CefSharp.MinimalExample.WinForms/CefSharp.MinimalExample.WinForms.csproj b/CefSharp.MinimalExample.WinForms/CefSharp.MinimalExample.WinForms.csproj index d20b60c..10113b4 100644 --- a/CefSharp.MinimalExample.WinForms/CefSharp.MinimalExample.WinForms.csproj +++ b/CefSharp.MinimalExample.WinForms/CefSharp.MinimalExample.WinForms.csproj @@ -1,7 +1,9 @@  - - + + + + Debug AnyCPU @@ -24,7 +26,7 @@ ..\ - 45cbb450 + 3cd3e083 x64 @@ -107,8 +109,6 @@ - - - - + + \ No newline at end of file diff --git a/CefSharp.MinimalExample.WinForms/packages.config b/CefSharp.MinimalExample.WinForms/packages.config index 92d8bc8..12a4067 100644 --- a/CefSharp.MinimalExample.WinForms/packages.config +++ b/CefSharp.MinimalExample.WinForms/packages.config @@ -1,7 +1,7 @@  - - - - + + + + \ No newline at end of file diff --git a/CefSharp.MinimalExample.Wpf/App.xaml b/CefSharp.MinimalExample.Wpf/App.xaml index b53d4c4..2632003 100644 --- a/CefSharp.MinimalExample.Wpf/App.xaml +++ b/CefSharp.MinimalExample.Wpf/App.xaml @@ -6,5 +6,6 @@ + diff --git a/CefSharp.MinimalExample.Wpf/Behaviours/TextBoxBindingUpdateOnEnterBehaviour.cs b/CefSharp.MinimalExample.Wpf/Behaviours/TextBoxBindingUpdateOnEnterBehaviour.cs new file mode 100644 index 0000000..1dcafd7 --- /dev/null +++ b/CefSharp.MinimalExample.Wpf/Behaviours/TextBoxBindingUpdateOnEnterBehaviour.cs @@ -0,0 +1,28 @@ +using System.Windows.Interactivity; +using System.Windows.Controls; +using System.Windows.Input; + +namespace CefSharp.MinimalExample.Wpf.Behaviours +{ + public class TextBoxBindingUpdateOnEnterBehaviour : Behavior + { + protected override void OnAttached() + { + AssociatedObject.KeyDown += OnTextBoxKeyDown; + } + + protected override void OnDetaching() + { + AssociatedObject.KeyDown -= OnTextBoxKeyDown; + } + + private void OnTextBoxKeyDown(object sender, KeyEventArgs e) + { + if (e.Key == Key.Enter) + { + var txtBox = sender as TextBox; + txtBox.GetBindingExpression(TextBox.TextProperty).UpdateSource(); + } + } + } +} diff --git a/CefSharp.MinimalExample.Wpf/CefSharp.MinimalExample.Wpf.csproj b/CefSharp.MinimalExample.Wpf/CefSharp.MinimalExample.Wpf.csproj index 2904c57..0b06e4a 100644 --- a/CefSharp.MinimalExample.Wpf/CefSharp.MinimalExample.Wpf.csproj +++ b/CefSharp.MinimalExample.Wpf/CefSharp.MinimalExample.Wpf.csproj @@ -1,7 +1,9 @@  - - + + + + Debug @@ -18,7 +20,7 @@ ..\ - 4198735b + 9c43457f true @@ -103,6 +105,7 @@ Code + @@ -144,10 +147,8 @@ - - - - + +