Unplanned
Last Updated: 10 May 2023 11:36 by ADMIN
Robert
Created on: 03 May 2023 12:31
Category: UI for WPF
Type: Bug Report
1
RadWindow activation from the Task Bar does not focus correctly

I use RadWindow as the main window for my application (primarily because I want to embed a menu in the title bar).  This works well except our users have reported a bug where they are unable to use hotkeys following activating the application from the TaskBar.

A typical scenario:

* minimise the application using the minimise button

* some time later, activate the app by clicking on the TaskBar icon

* Press CTRL+N hotkey combination which should execute a command

I have created a sample application that shows two windows: a regular Window and a RadWindow.  They both contain input bindings for the Ctrl+N combination.  When the regular window is activated from the taskbar, the input bindings work, but when the same sequence of events is performed on the RadWindow the input bindings do not work.  Clicking between the windows does work - it seems the problem is only related to application activation.

On a related note, both windows contain a TextBox control.  If text is highlighted in the regular window, the highlighted text is maintained and redisplayed when the window is activated.  This does not work for the RadWindow.  As it relates to keyboard focus, I wonder if the problem is related.

Attached Files:
1 comment
ADMIN
Martin Ivanov
Posted on: 10 May 2023 11:36

Hello Robert,

Thank you for the project.

Indeed, there is a difference in this behavior between the native Window and RadWindow. Based on your feedback we approved this issue.

We also tested the textbox highlighting behavior but couldn't recreate this with the original setup in the project. This happens only if you call this.Focus() in the RadMainWindow class (on Activated). Is that your case or the issue happens initially? Can you share a video showing the steps to reproduce that?

What we can suggest to workaround the original issue is to call the Focus() method in the Activated event handler of RadWindow like so:

private void RadMainWindow_Activated(object sender, EventArgs e)
{
            System.Diagnostics.Debug.WriteLine("RadMainWindow_Activated");            
            Dispatcher.BeginInvoke(new Action(() =>
            {
                this.Focus();
            }));
}

Regards,
Martin Ivanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.