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

How to navigate to a View? #1033

Closed
aWeinzierl opened this issue Aug 11, 2021 · 2 comments
Closed

How to navigate to a View? #1033

aWeinzierl opened this issue Aug 11, 2021 · 2 comments
Labels
question Further information is requested

Comments

@aWeinzierl
Copy link

Hi,
I am trying to navigate to a new View/Page in a Frame.
Therefore, Frame seems to have, for instance, the following method:

// Frame
pub fn Navigate3<'a>(
    &self,
    sourcepagetype: impl IntoParam<'a, TypeName>
) -> Result<bool>

Unfortunately, I fail to find a way to get a suitable argument using an existing View (extending Windows::UI::Xaml::Controls::Page)

@kennykerr
Copy link
Collaborator

This requires type-loading support for Xaml that is not currently provided by the Windows crate. There's an issue on the Xaml team to support Rust, but it doesn't look like they have any immediate plans to invest in this area.

microsoft/microsoft-ui-xaml#2488

@kennykerr
Copy link
Collaborator

For what its worth, here's a very low-level way to do the type-loading in C++:

https://github.com/kennykerr/binding/blob/master/Simpler/xaml.h

This should work in Rust, but this API is very very hard to use as it was designed for .NET and really doesn't work well for anything else.

I'd expect that the Windows crate could conceivably implement this for you automatically at some point in the future.

@kennykerr kennykerr added the question Further information is requested label Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants