We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Prism Navigation Issue

Thread ID:





147305 Sep 5,2019 01:27 PM UTC Sep 6,2019 02:16 PM UTC Xamarin.Forms 3
Tags: SfSchedule
Asked On September 5, 2019 01:27 PM UTC


I'm using SfSchedule in a POC Xamarin.Forms project using Prism.  I'm displaying schedule items in a Month view and when I tap on a cell I want to navigate away to another page using Prism's navigation service.  When I changed my code to inject the the INavigationService into the ViewModel constructor for the schedule page I got the following error:  Missing default constructor for 'ProductViewer.ViewModels.ScheduleViewModel' with File: SyncFusionSchedule.xaml line 16.

I assume syncefusion is expecting a default constructor which takes no parameters but how can I inject and use Prism navigation service here?

My Code: 
        public ScheduleViewModel(INavigationService naviagtionService)
            : base(naviagtionService)
            Title = "";

            ScheduleCellTapped = new Command<CellTappedEventArgs>(CellTappedAsync);

Thanks for any help.

Radoslaw Kubas
Replied On September 5, 2019 07:33 PM UTC

var naviagtionService = PrismApplicationBase.Current.Container.Resolve<INavigationService>();

Replied On September 6, 2019 12:38 PM UTC

Thank you Radoslaw.

Karthikraja Arumugam [Syncfusion]
Replied On September 6, 2019 02:16 PM UTC

Hi Eddie, 
Thank you for contacting Syncfusion support. 
Based on the shared information we checked your requirement of using Schedule with Prism NavigationService. As Radoslaw said you can achieve your requirement or we have prepared a sample to use Prism INavigationService in Schedule, you can refer the same to achieve your requirement. 
Sample link: SchedulePrism 
We hope this helps. Please let us know, if you need any further assistance. 
Karthik Raja A 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon