LazyLoading + pass params to view model of TabViewItems MVVM first approach. #1529
-
Hi all, I am trying to implement LazyView on my TabViewItem. My Xamarin project is using Prism and I have a main page that contains my TabView. I would like my TabViewItems to utilize LazyView. My main page is passed a parameter which needs to be presented to the ViewModels of the tab items as there are some methods that get called when loaded, how can I pass and provide the paramater to the TabViewItems in the VM that are wrapped with LazyView and do this once View is Loaded? @pictos Something like the prism equivalent is what I need, I cannot use regions in Templated View and doesn't provide lazy loading hence I am keen to get this working: if (parameters.ContainsKey("customerid"))
{
_regionManager.RequestNavigate("RefillsRegion", "RefillsView", RegionNavigationCallback, new NavigationParameters
{
{ "customerid", parameters.GetValue<long>("customerid") }
});
}
} Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 17 replies
-
@LeoJHarris I moved this to the Discussion session since this fits better. So I don't have too much experience with prism and other MVVM frameworks. Are you able to provide a simple sample project that I can play with and see if I find a good solution? I believe that you will need to create your own LazyView implementation with those extra features |
Beta Was this translation helpful? Give feedback.
-
@LeoJHarris https://github.com/ZHEAISNSAABN/ZhEaIsNsAaBn.Xamarin/tree/master/Src/ZhEaIsNsAaBn.Xamarin/LazyView |
Beta Was this translation helpful? Give feedback.
Sample.zip
@LeoJHarris