WPF - IWpfWebBrowser implement IInputElement

Simplify setting Focus from View model as now possible to call Keyboard.Focus(IWpfWebBrowser);

Resolves #3546
This commit is contained in:
Alex Maitland
2021-06-04 15:05:41 +10:00
parent 3dc37b2dd2
commit 7dfead360e
2 changed files with 3 additions and 2 deletions
@@ -207,7 +207,7 @@ namespace CefSharp.Wpf.Example.ViewModels
{
Address = AddressEditable;
Keyboard.Focus((IInputElement)WebBrowser);
Keyboard.Focus(WebBrowser);
}
public void LoadCustomRequestExample()
+2 -1
View File
@@ -3,6 +3,7 @@
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using System;
using System.Windows;
using System.Windows.Input;
using System.Windows.Threading;
using CefSharp.Enums;
@@ -15,7 +16,7 @@ namespace CefSharp.Wpf
/// and properties the <see cref="ChromiumWebBrowser" /> exposes.
/// </summary>
/// <seealso cref="CefSharp.IWebBrowser" />
public interface IWpfWebBrowser : IWebBrowser
public interface IWpfWebBrowser : IWebBrowser, IInputElement
{
/// <summary>
/// Navigates to the previous page in the browser history. Will automatically be enabled/disabled depending on the