How do I pass arguments to pages in a WPF application?

Posted by Rod on Stack Overflow See other posts from Stack Overflow or by Rod
Published on 2010-05-06T17:23:28Z Indexed on 2010/05/06 17:28 UTC
Read the original article Hit count: 401

Filed under:
|

I'm working on upgrading a really old VB6 app to a WPF application. This will be a page-based app, but not a XBAP. The old VB6 app had a start form where a user would enter search criteria. Then they would get results in a grid, select a row in the grid and then click on one of 3 buttons. I am thinking that what I'll do is use hyperlink controls on the WPF app. No matter what button the user clicked on the old VB6 app, it would go to a second form. What it did on the second form was dependent upon which button the user clicked on the first form. So, I want the first page in my WPF app to do the same thing, but depending upon which hyperlink they click on will dictate what happens on the second page. They will either (a) go to the second page to edit the details as well as a lot more information, related to what they selected on the first page, or (b) enter a new record and all associated data (a new client, in this case), or (c) create a new case for the same client, selected on the first page.

For me the hard thing is I don't know how to pass that information along to the second page. Is there something in WPF like in HTML where there's a query string? Or how do you get information from the first page to the second page, in WPF?

I'm working in VS 2008.

© Stack Overflow or respective owner

Related posts about wpf

Related posts about wpf-navigation