1

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.

Dave Clemmer
  • 3,741
  • 12
  • 49
  • 72
Troy
  • 381
  • 1
  • 4
  • 16

2 Answers2

1

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
  • 381
  • 1
  • 4
  • 16
0

You should check out this related StackOverflow question: 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.

Community
  • 1
  • 1
dthrasher
  • 40,656
  • 34
  • 113
  • 139