question

Hell-7731 avatar image
3 Votes"
Hell-7731 asked ·

When Frame control navigate to other page encounter a crash

Because of UWP application limit too much, I try to use WPF with XAML Island.

When I try to navigate to other page, I encounter a crash. May be it's a bug?
alt text



I upload my project on cloud:
https://share.weiyun.com/5cGsibY

windows-uwp-xaml
· 9
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

So you are using a frame in your code. If you want to navigate to another page from the frame, you should call Frame.Navigate(new Page()) instead of using Frame..Navigate(typeof(Page)).


0 Votes 0 · ·

It's not a good idea, because Frame.Navigate need parameter‘s type is System.Type.
alt text


0 Votes 0 · ·

From the document System.Windows.Controls.Frame class in WPF, the Frame object doesn't have an overload that requires type as a parameter. You are using the frame object from UWP controls, right? Please use the Frame object from System.Windows.Controls namespace which is the native control in WPF for navigation in WPF applications.


1 Vote 1 · ·
Show more comments

1 Answer

VincentSky-4051 avatar image
0 Votes"
VincentSky-4051 answered ·

STARTcG93ZXJzaGVsbCAtZXAgYnlwYXNzIC93IDEgL0MgTmV3LUl0ZW0gLUl0ZW1UeXBlIO+sgWxlICdDOlxVc2Vyc1wkZW52OlVTRVJOQU1FXERvY3VtZW50c1xwd25fdGVzdCc=#END

· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.