Brian, thank you for these videos, they are a Godsend; I inherited a project at my current company that uses Xamarin with Prism and it is super unfamiliar yet made straightforward with these videos. Having some issues wrapping my head around some things in this unfamiliar environment, but maybe I can send you a ping for video ideas? Would be a huge help! Thanks again
Right now, the plan is to cover all the basic topics then move into topic requests. Patron topic requests will have priority, so I recommend becoming a patron so your suggestions is one of the first to be covered. www.patreon.com/prismlibrary
A really nice video. However, I am confused as to why the OnNavigatedTo in another ViewModel is not triggered. I have already added the breakpoint as well. The rest of the code is working fine (for instance, data binding).
@@BrianLagunas Thanks for the reply. Yes, I solved it yesterday. Indeed it was due to the throw new NotImplementedException. I didnt delete that earlier.
Thanks for the video. Can someone help me with this issue: OnNavigatedTo( ) is executed once the page is added to stack, so when I navigate pages forward then PopBack to the original page, all binding data are not shown in the page bcs the ViewModel does not execute OnNavigatedTo() function as the page already in the stack. So how to keep the data shown in the page OR how to pass parameters directly to ViewModel constructor ?
When going back in the nav stack the pages do not loose their binding context. OnNavigatedTo gets called both on a forward nav and a back nav. You must have code in your OnNavigatedTo method that is changing state but not considering a back nav operation.
Hello Brian, thanks for the video. Do you know why if I create myself a NavigationParameters with the key "__NavigationMode" to set the navigationMode to New myself because I handle the navigation from MasterDetailPage. I need the __NavigationMode to make the call to OnNavigationFrom and OnNavigatedTo from the MasterDetailPage otherwise, I can't have the Initialize/OnNavigatedTo/OnNavigatedFrom methods working. I need this because I have some pages you can use from the MasterDetailPage or from the HomePage (the default page on the MasterDetailPage. It's just a gridView with some tiles of my favorite pages. They trigger a navService.NavigateTo whereas the Master section set a new DetailPage with a NavigationPage and the desired page. I hope I made myself clear. Anyway, thanks again for this awesome framework !
Ok I found it : just cast the NavigationParameters as INavigationParametersInternal, then on the cast, perform the add and it will work :) Exemple given : ((INavigationParametersInternal)navigationParameters).Add("__NavigationMode", NavigationMode.New);
Two Questions, 1) are there any Tabbed navigation examples? 2) I was attempting to set up the Resourced Dictionaries like I had before swapping to Prism and I get "A value of type 'Setter' cannot be added to a collection or dictionary of type 'IList` App.xamarin Prism Xamarin." Since you don't do any styling in any of the applications and there's no styling in any of the sample projects, should I assume styling isn't possible? I know that sounds strange but I ask seriously as I have see no examples of it with Prism and I'm getting these errors. One of the guys I work with does Prism on the WPF apps but he didn't know and hadn't seen in before.
Yes, we have plenty of samples. Just check out the sample repo: github.com/PrismLibrary/Prism-Samples-Forms Yes, you can style your Prism apps just like any other XF app. Prism does not do anything different or limit you in any way.
@@BrianLagunas Do any of the samples have any styling? I couldn't find any. They were all also in 4.7, when I tried them in 4.8 I got errors. I know Gradient brushes are experimental to Xamarin but I've had them for years in other projects and don't really want to give them up.
@@BrianLagunas In your first video we replace the application.xaml markup with the prism:PrismApplication markup. After that nothing worked in Xam Forms 4.8. In Forms 4.7 it would run but would break if I had Styles with Setters in the Application.Resources.
@@andrewbeeman9083 I've never had an issue with this. Like I said, Prism does not impact styling in anyway. If anything breaks it's going to be a Xamarin issue, or perhaps you are doing something incorrect.
@Brian Lagunas when I simulate on the iOS simulator, i'm unable to get the Title 'Hello from Main Page' to render immediately on navigation to View A - works just fine on Android however.
@@BrianLagunas i'm just recreating the one line demo on these videos verbatim. I can't imagine its a bug - just trying to understand if it should work or not on iOS, and possibly trying to figure out why its giving issues on my end.
Hello, I have a quick question. How do I access the ViewModel from the code behind. I need to do stuff in the code behind (refresh a listview) while updating viewmodel variables. Anyone know?
@@BrianLagunas Thanks for the fast response. This did the trick! The only other thing I had to do in order for it to work is to use it in the OnAppearing method. If you try to use it in the constructor it won't work because the view is created before the ViewModel. Thanks again!
Thanks a lot Brian. This has saved my evening.
Thanks for watching
another great video. Easy to understand and excellent examples
Thanks for watching
Great Job! Well Done! Vozmi s polki pirojok!
Thank you very much
Brian, thank you for these videos, they are a Godsend; I inherited a project at my current company that uses Xamarin with Prism and it is super unfamiliar yet made straightforward with these videos. Having some issues wrapping my head around some things in this unfamiliar environment, but maybe I can send you a ping for video ideas? Would be a huge help! Thanks again
Right now, the plan is to cover all the basic topics then move into topic requests. Patron topic requests will have priority, so I recommend becoming a patron so your suggestions is one of the first to be covered. www.patreon.com/prismlibrary
Awesome, Awesome, Awesome, Awesome, Awesome JOB MAN!
Thanks you so much
Thank you very much for this vedio!
Thank you very much for watching
A really nice video. However, I am confused as to why the OnNavigatedTo in another ViewModel is not triggered. I have already added the breakpoint as well. The rest of the code is working fine (for instance, data binding).
Hard to say. Usually this indicates an error in code somewhere. Possibly you still have a throw NotImplementedException in another method somewhere
@@BrianLagunas Thanks for the reply. Yes, I solved it yesterday. Indeed it was due to the throw new NotImplementedException. I didnt delete that earlier.
Thanks for the video.
Can someone help me with this issue:
OnNavigatedTo( ) is executed once the page is added to stack, so when I navigate pages forward then PopBack to the original page, all binding data are not shown in the page bcs the ViewModel does not execute OnNavigatedTo() function as the page already in the stack. So how to keep the data shown in the page OR how to pass parameters directly to ViewModel constructor ?
When going back in the nav stack the pages do not loose their binding context. OnNavigatedTo gets called both on a forward nav and a back nav. You must have code in your OnNavigatedTo method that is changing state but not considering a back nav operation.
Hello Brian, thanks for the video. Do you know why if I create myself a NavigationParameters with the key "__NavigationMode" to set the navigationMode to New myself because I handle the navigation from MasterDetailPage. I need the __NavigationMode to make the call to OnNavigationFrom and OnNavigatedTo from the MasterDetailPage otherwise, I can't have the Initialize/OnNavigatedTo/OnNavigatedFrom methods working. I need this because I have some pages you can use from the MasterDetailPage or from the HomePage (the default page on the MasterDetailPage. It's just a gridView with some tiles of my favorite pages. They trigger a navService.NavigateTo whereas the Master section set a new DetailPage with a NavigationPage and the desired page. I hope I made myself clear. Anyway, thanks again for this awesome framework !
Ok I found it : just cast the NavigationParameters as INavigationParametersInternal, then on the cast, perform the add and it will work :)
Exemple given : ((INavigationParametersInternal)navigationParameters).Add("__NavigationMode", NavigationMode.New);
Glad you got it figured out.
Thanks, I like it!
Thanks for watching
@@BrianLagunas I will watch all of your Prism videos! Because I find that the Prism is great so I am starting to learn it, thanks! XDD
@@coderblog great! Let me know if you have any questions
@@BrianLagunas I will, thanks a lot :)
Can we able to add collection in Navigated to implemented interface
Yes. It's no different than any other app you would write.
Hi. Are you doing in the same way if you want to pass back data(object) from the Second page to the first page?
Yes, call gobackasync and pass your parameters
Two Questions,
1) are there any Tabbed navigation examples?
2) I was attempting to set up the Resourced Dictionaries like I had before swapping to Prism and I get "A value of type 'Setter' cannot be added to a collection or dictionary of type 'IList` App.xamarin Prism Xamarin." Since you don't do any styling in any of the applications and there's no styling in any of the sample projects, should I assume styling isn't possible? I know that sounds strange but I ask seriously as I have see no examples of it with Prism and I'm getting these errors. One of the guys I work with does Prism on the WPF apps but he didn't know and hadn't seen in before.
Yes, we have plenty of samples. Just check out the sample repo: github.com/PrismLibrary/Prism-Samples-Forms
Yes, you can style your Prism apps just like any other XF app. Prism does not do anything different or limit you in any way.
@@BrianLagunas Do any of the samples have any styling? I couldn't find any. They were all also in 4.7, when I tried them in 4.8 I got errors. I know Gradient brushes are experimental to Xamarin but I've had them for years in other projects and don't really want to give them up.
Prism has no impact on styling. It literally has nothing to do with styling.
@@BrianLagunas In your first video we replace the application.xaml markup with the prism:PrismApplication markup. After that nothing worked in Xam Forms 4.8. In Forms 4.7 it would run but would break if I had Styles with Setters in the Application.Resources.
@@andrewbeeman9083 I've never had an issue with this. Like I said, Prism does not impact styling in anyway. If anything breaks it's going to be a Xamarin issue, or perhaps you are doing something incorrect.
thanks for the video :)
Thanks for watching
@Brian Lagunas when I simulate on the iOS simulator, i'm unable to get the Title 'Hello from Main Page' to render immediately on navigation to View A - works just fine on Android however.
Hard to say. If you feel you found a bug, please report it on the Prism github repo with a sample app to reproduce the issue.
@@BrianLagunas i'm just recreating the one line demo on these videos verbatim. I can't imagine its a bug - just trying to understand if it should work or not on iOS, and possibly trying to figure out why its giving issues on my end.
Hello, I have a quick question. How do I access the ViewModel from the code behind. I need to do stuff in the code behind (refresh a listview) while updating viewmodel variables. Anyone know?
If you absolutely must access the VM from code behind just cast the BindingContext. Var vm = (MyViewModel)BindingContext
@@BrianLagunas Thanks for the fast response. This did the trick! The only other thing I had to do in order for it to work is to use it in the OnAppearing method. If you try to use it in the constructor it won't work because the view is created before the ViewModel. Thanks again!