tags:

views:

205

answers:

2

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.

+1  A: 

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.

Troy
A: 

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.

dthrasher