WPF - PageFunctions. What are they needed for?

I have been working in WPF for a couple of months now, and I managed to understand what it is and why / when it is used, but I'm still trying to see the value of the PageFunction class.

Can someone give me a simple but concrete example of when PageFunction can be the right tool for the job?

+4
source share
3 answers

Basically, this is apparently a template for formalizing branching in a task-based user interface.

Say you have a checkmark form for an additional function, but this function requires additional information that is too complicated to fit on one page. Using this template allows you to delegate the collection of information to another component.

In addition, there is a type of strategy template, because you can have different subsystems that can collect the same information, all of which inherit the PageFunction (of T) function, so the code that actually calls them should not know any details about it .

These are just some ideas, I did not quite understand.

+4
source

PageFunction in the page dialog = in the working application (no page).

You can use the PageFunction every time you use a dialog box in a desktop application and want to develop a behavior like web navigation for your program.

+4
source

The main functions of including pages are the execution of workflows with subtasks and the management of the return stack.

If you just rely on page navigation, it's hard to pause the current navigation path, do something else, and then go back and continue. PageFunctions allows this through the concept of the Return and Unwind Navigation Stack.

I gave some real examples of this here: http://www.paulstovell.com/wpf-navigation

+1
source

All Articles