-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Window becomes inactive after DialogHost.Show() #3497
Comments
Can you provide us a test repository which show cases the problem? |
Here are the two minimal projects inside the solution DialogHostTest - v5.0.1-ci588, when clicking on any of the buttons the window title becomes inactive DowngradedTest - v4.10.0-ci317, the window stays active (which is what I want, it looks nice) |
I pinpointed the issue these lines of code in This change was introduced by @Keboo in this commit. @Keboo do you remember why these lines were necessary? |
This issue is marked stale because it has been open 30 days with no activity. Remove stale label or update the issue, otherwise it will be closed in 14 days. |
This issue is marked stale because it has been open 30 days with no activity. Remove stale label or update the issue, otherwise it will be closed in 14 days. |
Similar issue here. My textbox within dialog UserControl loses focus after DialogHost.Show(). In 4.9.0 it doesn't happen |
I’ve read #2912, #3451, and this thread, so I have some understanding of the issue's background.
To meet these requirements, I believe the best solution is to provide an argument when calling the Of course, there is some debate as to which default behavior-whether 1. or 2.-is appropriate for the existing @MichelMichels, what do you think about this solution? |
@ashidaharo I don't think there is a situation where the |
@MichelMichels |
@ashidaharo I see now. Apologies for any confusion. What I ment was that (in my opinion) the |
This issue is marked stale because it has been open 30 days with no activity. Remove stale label or update the issue, otherwise it will be closed in 14 days. |
Bug explanation
I'm trying to make a preloader using DialogHost (I need to display a loading indicator and lock the application while the data is being loaded)
However, when I call DialogHost.Show(), the application window loses focus
5.0.1-ci571:
bandicam.2024-03-16.22-44-17-543.mp4
if you click on a dialog, the window will become active again along with the dialog.
so they are not mutually exclusive
In my past project I used version 4.6.1 and the window did not lose focus when DialogHost was opened
I tried different versions in the current project:
4.10.0-ci317:
bandicam.2024-03-16.23-30-59-746.mp4
How can this be fixed without downgrading to an older version?
My code:
PreloaderDialog
MainWindow
Method to show preloader
Calling code
Version
5.0.1-ci571
The text was updated successfully, but these errors were encountered: