rafallopatka / ToastNotifications

Toast notifications for WPF allows you to create and display rich notifications in WPF applications. It's highly configurable with set of built-in options like positions, behaviours, themes and many others. It's extendable, it gives you possibility to create custom and interactive notifications in simply manner.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

keyboard input is not possible.

eventjang opened this issue · comments

Good morning.
We are creating a hybrid app using HTML.
I need the Notification function in my app, so I am developing it as Custom Notification provided by the library.

I added CEFSharp's WebView in Custom Notification.xaml, and it loads an HTML page.
There is a text input in the HTML page, but keyboard input is not possible.
I want to know what the cause is. Is there a way to fix it?

The thing is that the default behaviour of notifier is to block all input events which may interrupt notifications. Now it's possible to override this behaviour.

The code below or sample project CustomNotificationsExample in sources presents how to do that.
You can specify which sources of keyboard input events are allowed. You can also create your own handler, or use Delegate DelegatedInputEventHandler

        _notifier = new Notifier(cfg =>
        {
            cfg.KeyboardEventHandler = new AllowedSourcesInputEventHandler(new []{ typeof(CustomInputDisplayPart) });
        });