My project using MVVM design pattern using Prism and Unity, basically following the famous Prism video by Brian Lagunas, but the video didn't mention how to create/use partial view, User Control used in other User Controls.
I'm trying to create custom partial view(UserControl) can be reused in other page (User Control). For example, a View contains a "Browse" button Binding SelectFileCommand and Publish the file Path when done. If I have two of this View in one page, how can I subscribe to the correct command? Both Commands called same name.
For using Partial View:
Register View Type in Module like this:
container.RegisterType<IPartialView, PartialView>();
and use the view directly in page like this:
<views:PartialView DataContext="{Binding PartialViewModel}" />
I'm not sure if this is the correct way to implement Prism MVVM pattern. Please let me know if this is the wrong idea, and how to implement these kind of Partial View.
Thanks a lot.