SteveSandersonMS / WebWindow

.NET Core library to open native OS windows containing web UI on Windows, Mac, and Linux. Experimental.
Apache License 2.0
1.98k stars 215 forks source link

Add some properties for WebWindow. #31

Closed Berrysoft closed 4 years ago

Berrysoft commented 4 years ago

Working items

Related issues

35

39

Berrysoft commented 4 years ago

@SteveSandersonMS Using auto charset I could remove the multi-byte<=>wide-char string convert methods, and reduce some allocations. I think it belongs to the cleanup, which is my first working item. Please tell me if you want a separate pull request.

SteveSandersonMS commented 4 years ago

This is looking great! Thanks for working on this.

I’m fine with charset cleanup either being in the same PR or a different one.

Berrysoft commented 4 years ago

@SteveSandersonMS I've added the features planned above. However, I don't have a Mac with me now. Could you help me test it? The test page has been added to testassets/MyBlazorApp.

Also there's a remaining issue I haven't figure out the reason: if you call StateHasChanged in the handler of SizeChanged or LocationChanged, the window will block. The work around is to wrap StateHasChanged in Task.Run(...).

Berrysoft commented 4 years ago

My Edge Dev updated automatically and it deprecated an API the project uses. I had to use newer API to test it.

SteveSandersonMS commented 4 years ago

This is looking great, @Berrysoft! If you could let me know when you consider this done and ready to merge, I'll be happy to proceed with it.

Berrysoft commented 4 years ago

@SteveSandersonMS I consider it done now. I will keep investigating better work around for the thread problem, but I don't think it is easy to solve at once.

Berrysoft commented 4 years ago

ping @SteveSandersonMS

SteveSandersonMS commented 4 years ago

Thanks, will take a look!

SteveSandersonMS commented 4 years ago

Thanks again @Berrysoft for this! It's looking great!

I've tried it out and encountered a few issues on macOS:

I've added some fixes for this which I will include when merging this PR.

SteveSandersonMS commented 4 years ago

Merged. Thanks again @Berrysoft!

Berrysoft commented 4 years ago

That's OK, and thank you for your help and fixes!