Upgrading from MyToolkit 2.2.x to 2.3.14 prevents first Page from showing

Oct 16, 2014 at 7:12 PM
Hi,

I have just upgraded the MT reference on an old project to 2.3.14, and I am having trouble getting the first page in the app to appear - the app appears to just idle at the splash screen. I've made changes suggested in Paging article::
  1. Changed App to inherit from MtApplication in App.xaml:
// App.xaml
<paging:MtApplication
   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
   xmlns:Converters="using:MyToolkit.Converters"
   xmlns:paging="using:MyToolkit.Paging"
   x:Class="MyApp.App">
<Application.Resources>...</Application.Resources>
</paging:MtApplication>
  1. Changed App to inherit from MtApplication in App.xaml.cs and made other changes recommended in sample:
// App.xaml.cs
namespace MyApp
{
   /// <summary>
   /// Provides application-specific behavior to supplement the default Application class.
   /// </summary>
   sealed partial class App : MtApplication
   {
      /// <summary>
      /// Initializes the singleton Application object.  This is the first line of authored code
      /// executed, and as such is the logical equivalent of main() or WinMain().
      /// </summary>
      public App()
      {
         InitializeComponent();
      }

      public override Type StartPageType
      {
         get { return typeof(HomeItemPage); }
      }
   }
}
  1. HomeItemPage is of type MtPage and is rendered correctly in Blend and Designer.
Not sure what else to do - anything I am obviously overlooking?

Thanks,
Daniel
Coordinator
Oct 16, 2014 at 7:18 PM
Hi,

if you override OnInitializedAsync in MtApplication, is it called?
Coordinator
Oct 16, 2014 at 7:22 PM
In Visual Studio, open Debug > Exceptions..., there select "Common Language Runtime Exception" => Thrown. When you start the app now, do you see an exception?

Additionally you can download the source code of the project here: https://mytoolkit.codeplex.com/SourceControl/latest
There you can find a sample application "SampleWindowsStoreApp" where you can check your code against
Oct 16, 2014 at 7:39 PM
Edited Oct 16, 2014 at 7:41 PM
Hi Rico,

Thanks for your response. In App.xaml.cs, the following happens at start:
  • If I add an override for OnInitializedAsync(), it is called.
  • If I add an override for OnLaunched(), it is called.
  • App's StartPageType is queried by OnLaunched().
I also put a breakpoint on the HomeItemPage constructor and verified that it is being called:
      public HomeItemPage()
      {
         InitializeComponent();
      }
I do not see any exceptions, even after setting the Exceptions window to break on all thrown CLR exceptions.

I downloaded the source of the latest and compared side by side App.xaml, App.xaml.cs, HomeItemPage.xaml / WelcomePage.xaml, and HomeItemPage.xaml.cs / WelcomePage.xaml.cs - I wasn't able to see any relevant differences.
Coordinator
Oct 18, 2014 at 4:03 PM
Can you send me a sample project where this problem can be reproduced?