I have created a custom Menu User control in WPF Browser application. How can I achieve Navigation fro开发者_C百科m one page to other page using this Custom Menu User control from Main page. The pages would be displayed in other Frame control of the Main page.
There are different options to achieve this. Can you provide more details on how you're loading your UI? (i.e. Prism regions/modules, Data Templates, etc.)
My general suggestion would be one of two options:
- Use a mediator pattern to have the menu control notify the frame control. MVVM Light has an easy to use Messenger implementation, which is a great toolkit to explore, in my opinion.
- Have both controls contained in one "parent" control (or view model if you're using MVVM) which can then communicate to the frame control since it contains both menu and frame controls.
HTH, Ben
精彩评论