Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I am very new to WPF and have what appears to be a simple question:

I have a Frame and I set the Source to the Uri of one of my pages. I want to pass some query string parameters to the page, but I am not sure how to access them in the Loaded event of the Page.

share|improve this question

2 Answers 2

Found it: NavigationService.CurrentSource will give you the Uri of the current page that you are on and you can grab the query string parameters from that.

share|improve this answer

You should check out this related StackOverflow question: http://stackoverflow.com/questions/1351546/passing-parameters-to-a-wpf-page-via-its-uri

Paul Stovell's answer explains a better approach for passing data than using a query string.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.