Skip to content
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

Changes to .NET 6 WPF BlazorWebView startup #333

Open
wants to merge 1 commit into
base: dotnet6
Choose a base branch
from

Conversation

Eilon
Copy link
Member

@Eilon Eilon commented Feb 24, 2021

  • Change startup code to wait for all properties to be set
  • Made all properties DependencyProperties to monitor property changes
  • Hooked various control lifecycle stages to attempt WebView startup

This is based on some conversations with WPF experts and much analysis. I've tried several alternatives and nothing else seemed to work. Based on docs, using a ControlTemplate seems like a reasonable approach. It does mean that developers could try to much with implementation details of this control, but I consider that to simply be "not supported" if they do something wacky.

There are still unresolved issues around the following:

  • What to do if a property is changed after the Blazor app has started? Make it work? Throw? Ignore? The answer might depend on each property, but it's something we need to answer.
  • When/how to dispose/shut down the Blazor components and other resources used by the control? Sadly there is no good answer to this in WPF. I am still looking into options for this.

- Made all properties DependencyProperties to monitor property changes
- Hooked various control lifecycle stages to attempt WebView startup
@Eilon
Copy link
Member Author

Eilon commented Mar 1, 2021

Oops @SteveSandersonMS I forgot to tag you on this! 😁 If you could take a quick look for a sanity check, I will re-apply these changes to the big PR in the ASP.NET Core repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant