Forum Xamarin.Forms

Navigating from a XAML Splash page to a Tabbed page

NoelFernandesNoelFernandes AEMember ✭✭

Hi All,

I have pretty much set up my XF application using MVVMLight and following this article.

I would now like to introduce a XAML Splash page, have it loaded at startup by assigning it to the MainPage property in App.xaml.cs. Once loaded, in the splash page, I would like to do some asynchronous tasks to initialize the app i.e. fetch initial data from an API etc. Once this is done, I would like to navigate to the MainTabbed page.

I haven't written the initialization logic as yet so I'm using Thread.Sleep to simulate this.

I have read a lot of articles and tried a couple of things and I'm stuck at a point where I have either one of these issues:

1) Splash page loads but then does not navigate to the Tabbed page.
2) Splash page does not load at all and navigates to Tabbed page directly.

This article is the closest that I have come across but I seem to be getting an error while releasing the semaphore:

05-09 19:22:12.471 I/MonoDroid(14342): System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Threading.SemaphoreFullException: Adding the specified count to the semaphore would cause it to exceed its maximum count.
05-09 19:22:12.471 I/MonoDroid(14342):   at System.Threading.SemaphoreSlim.Release (System.Int32 releaseCount) [0x0004c] in <fcbf47a04b2e4d90beafbae627e1fca4>:0 
05-09 19:22:12.471 I/MonoDroid(14342):   at System.Threading.SemaphoreSlim.Release () [0x00000] in <fcbf47a04b2e4d90beafbae627e1fca4>:0 

Appreciate any advice on the above or how one could implement a splash page using xaml (if that even makes sense conceptually) as most of the articles are using native implementations or images in the native projects.

Thanks in advance.

Sign In or Register to comment.