开发者

Custom Menu UserControl WPF

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:

  1. 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.
  2. 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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜