-
Notifications
You must be signed in to change notification settings - Fork 497
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
Are there any examples showing a WinUI application developed using windows-rs? #2971
Comments
I might be able to get something running if this is still valid. |
I think WinUI3 is very much limited to C# in practice (if not in theory)? Maybe it would be easier to create a thin C# UI wrapper that then invokes rust functions? |
It doesn't absolutely have to be WinUI3, I just need that new style root window object addressable from the rust code so that I can spot the picker dialog, I saw a single reference of a guy saying he got it running with rust in some comments just a bit ago but the specifics aren't important. It very well might be easier, I don't have the experience with the interrop there. Thanks for the response. |
We went down this road with https://github.com/microsoft/windows-app-rs. To quote from that:
|
Thank you for the answer @riverar, are win32 guis the only supported via rust at the moment (assuming they are then for what I'm doing I'm going to see if I can hook into a win32 processing loop for what's needed or as @ChrisDenton mentioned, run C# also)? |
This comment was marked as outdated.
This comment was marked as outdated.
@robmikh has a great crate demonstrating usage of Windows.Graphics.Capture (https://github.com/robmikh/screenshot-rs). I suspect this will help! |
@riverar For future reference if it's unclear, the answer was that the modern Windows GUI at the time of writing (xaml via WinUI3) only supports C# (I have used it with F# but besides the point). |
@tmheath Can you also mark the answer I provided on Q&A to close this all out? Thanks! |
I'd also like to point out that many WinRT pickers that assume a CoreWindow can be used by QIing for IInitializeWithWindow and providing an HWND before showing the picker. This includes the GraphicsCapturePicker. |
The microsoft Q&A site? Will do soon as I see, also thanks @robmikh, That's really nice for reference somewhere |
Suggestion
Proceeding from finding this comment I looked for an examples directory but didn't see it, is there one? Background: Trying to get a gui running because it looks like the captureobjectpicker requires a WinUI root window that I haven't seen how to create and not a win32 window to hook it's events into. I did post an actual question to the Microsoft link from the issues tab for a separate issue which does belong in the Microsoft Q&A but that site is a bit broken.
The text was updated successfully, but these errors were encountered: