0

I have the following folder structure in my project:

enter image description here

In the UserControls folder are "L_Menu.xaml" and "LS_Account.xaml". These are both simple user controls. On the “L_Menu” user control there is a frame control which is empty for now, so the property “Source” is still null.

Now I want to set the source property of the frame to the uri of the “LS_Account” user control by a click event. I use the following uri: "pack://application:,,,/src/Content/UserControls/LS_Account.xaml".

myFrame.Source = new Uri("pack://application:,,,/src/Content/UserControls/LS_Account.xaml", UriKind.Relative);

When executing the code I get the following error message:

"The resource "src/content/usercontrols/src/content/usercontrols/ls_accout.xaml" cannot be found."

Why is the “new” source attached to the source of the “L_Menu” user control?

1 Answer 1

1

I know how.

Just use this.

yourFrame.Navigate(yourUri);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.