You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I have multiple different views that share the same ViewModel:
classViewA:UserControl,IViewFor<WaitingFunVM>{}Locator.CurrentMutable.Register(typeof(ViewA),typeof(IVewFor<WaitingFunVM>));classViewB:UserControl,IViewFor<WaitingFunVM>{}// specify a ContractB hereLocator.CurrentMutable.Register(typeof(ViewB),typeof(IVewFor<WaitingFunVM>),ConstractB);// specify a ViewContract=ConstractB<rxui:ViewModelViewHostx:Name="myview" ViewContract="ConstractB"/>
Is your feature request related to a problem? Please describe.
I have multiple different views that share the same ViewModel:
The current implementation of
ViewModelViewHost
falls back to resolve view with no contract if nothing found.In other words, it will render
ViewA
if nothing found even if I request aViewContract=ContractB
.In my case, the
ViewB
is implemented by other plugin authors and is optional. What I want is:ViewB
implementation, it rendersViewB
ViewB
, it renders nothing (instead ofViewA
)Describe the solution you'd like
add a property of
ContractFallbackByPass
for the ViewModelHost so that we can bypass the fallback to viewLocator.ResolveView(viewModel);?e.g. :
Describe alternatives you've considered
make the private
ResolveViewForViewModel
protected virtual so that we can override it.Describe suggestions on how to achieve the feature
ContractFallbackByPass
with a default value = false for all the ViewModelViewHostAdditional context
See discussion #3712
The text was updated successfully, but these errors were encountered: