Problems adding to Windows Phone project of Universal app

May 28, 2015 at 6:40 AM
Edited May 28, 2015 at 6:44 AM
I am trying to use the control in a Universal app - the Windows Phone project initially, on a page with a hub.

Is this control not intended for use in Windows Phone XAML (aka RT, aka Universal) apps?

Adding the xaml before the Hub control shows that the xaml is highlighted invalid in the designer, stating: "Could not find windows runtime type Windows.UI.Xaml.Tickbar".

Running the app gives an exception, but not very helpful:

A first chance exception of type 'Windows.UI.Xaml.Markup.XamlParseException' occurred in MetroToGo.WindowsPhone.exe

WinRT information: Cannot create instance of type '%0' [Line: 35 Position: 45]

Additional information: The text associated with this error code could not be found.

Here is a snippet of the xaml, the control is placed within the first Grid of the page, before the Hub:

    <toastinet:Toastinet x:Name="Toast" Title="None found" VerticalAlignment="Top" />

    <Hub x:Name="PlanHub" x:Uid="PagePlanHub" Header="#plan" SectionsInViewChanged="Hub_OnSectionsInViewChanged">
        <HubSection x:Uid="PagePlanHubSectionJourney" Header="#JOURNEY" DataContext="{Binding Sections[0]}" HeaderTemplate="{ThemeResource HubSectionHeaderTemplate}">
Jun 26, 2015 at 4:10 AM
Same here..
Jun 27, 2015 at 4:21 AM
still throws the exception.
Jun 29, 2015 at 9:33 AM
Ok ! I found it !

The nuget package was not well created (I replaced the WinRT dll for WP by the SL dll for WP).
In your project, check the reference properties: the description is "Toastinet for WP SL"

I have updated the nuget package, and now, the description is the good one: "Toastinet for WinRT"

Use your nuget manager to update Toastinet to the 2.2 version.

Thanks again for your report ;)
Aug 18, 2015 at 6:31 PM
Thanks, it fixed it.

Looks very good.

Question: Is there any way to dismiss the toast on user-tap or user-swipe, rather like the native toast notifications on the phone? Closest I can get is hooking up the Tapped event but cannot find a way to close the toast immediately.