Browse Source

WPF - IWpfWebBrowser implement IInputElement

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

Resolves #3546
pull/3607/head
Alex Maitland 4 years ago
parent
commit
7dfead360e
  1. 2
      CefSharp.Wpf.Example/ViewModels/BrowserTabViewModel.cs
  2. 3
      CefSharp.Wpf/IWpfWebBrowser.cs

2
CefSharp.Wpf.Example/ViewModels/BrowserTabViewModel.cs

@ -207,7 +207,7 @@ namespace CefSharp.Wpf.Example.ViewModels
{
Address = AddressEditable;
Keyboard.Focus((IInputElement)WebBrowser);
Keyboard.Focus(WebBrowser);
}
public void LoadCustomRequestExample()

3
CefSharp.Wpf/IWpfWebBrowser.cs

@ -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

Loading…
Cancel
Save