Skip to content

Commit 7dfead3

Browse files
committed
WPF - IWpfWebBrowser implement IInputElement
Simplify setting Focus from View model as now possible to call Keyboard.Focus(IWpfWebBrowser); Resolves #3546
1 parent 3dc37b2 commit 7dfead3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CefSharp.Wpf.Example/ViewModels/BrowserTabViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ private void Go()
207207
{
208208
Address = AddressEditable;
209209

210-
Keyboard.Focus((IInputElement)WebBrowser);
210+
Keyboard.Focus(WebBrowser);
211211
}
212212

213213
public void LoadCustomRequestExample()

CefSharp.Wpf/IWpfWebBrowser.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
44

55
using System;
6+
using System.Windows;
67
using System.Windows.Input;
78
using System.Windows.Threading;
89
using CefSharp.Enums;
@@ -15,7 +16,7 @@ namespace CefSharp.Wpf
1516
/// and properties the <see cref="ChromiumWebBrowser" /> exposes.
1617
/// </summary>
1718
/// <seealso cref="CefSharp.IWebBrowser" />
18-
public interface IWpfWebBrowser : IWebBrowser
19+
public interface IWpfWebBrowser : IWebBrowser, IInputElement
1920
{
2021
/// <summary>
2122
/// Navigates to the previous page in the browser history. Will automatically be enabled/disabled depending on the

0 commit comments

Comments
 (0)