-
Notifications
You must be signed in to change notification settings - Fork 49
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
feat: Add doNotActivate
parameter to NavigateAsync
method from Navigation Extensions
#2397
base: main
Are you sure you want to change the base?
feat: Add doNotActivate
parameter to NavigateAsync
method from Navigation Extensions
#2397
Conversation
…vigation Extensions
@xperiandri can you provide more context on the scenario you're trying to get to work? |
OpenIddict Client starts a hosted service to determine protocol activation, redirect it and close the app. |
ok let me double check this next week - I thought we had a mechanism that would ensure some services are started before activation (eg localization from recollection). |
I need this behavior, please |
And I would prefer ability to just plug OpenIddict Client and it worked then declaring some additional services, implement some additional interfaces, etc. |
@@ -22,5 +22,6 @@ internal interface IRootViewInitializer | |||
/// <param name="window"></param> | |||
/// <param name="element"></param> | |||
/// <param name="loadingTask"></param> | |||
void InitializeViewHost(Window window, FrameworkElement element, Task loadingTask); | |||
/// <param name="doNotActivate"></param> | |||
void InitializeViewHost(Window window, FrameworkElement element, Task loadingTask, bool doNotActivate = false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's odd using a double negative like that. That's confusing.
@xperiandri the interface I was thinking of is the IStartupService, which will effectively block activation until it returns. You can register this service in order to block activation. |
Sounds like a good idea in general. Inherit from it, remove registration as IHostedService from DI and register as Kevin sealed |
GitHub Issue (If applicable): closes #2381
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Window is always activated as soon as possible
What is the new behavior?
Window is activated either as soon as possible or right after the host is started (all hosted services completed)
PR Checklist
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Run
results.