Search code examples
xamlwindows-phone-8windows-phonesilverlight-toolkit

Windows Phone - XamlParseException


I get a XamlParseExeption while navigating to my page. The problem seems be to something with toolkit TiltEffect or TransitionService:

System.Windows.Markup.XamlParseException
  HResult=-2146233087
  Message=Unknown parser error: Scanner 2147500037. [Line: 16 Position: 38]
  Source=System.Windows
  LineNumber=16
  LinePosition=38
  StackTrace:
       at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
       at ContactChooser.ContactChooserPage.InitializeComponent()
       at ContactChooser.ContactChooserPage..ctor()
  InnerException: 

The last line is number 16:

<phone:PhoneApplicationPage
    x:Class="ContactChooser.ContactChooserPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="True"
    toolkit:TiltEffect.IsTiltEnabled="True">

Solution

  • I have found the issue. I have two projects in my solution: the main project who is using the TiltEffect and a sample project for testing the main project. The solution of the issue is that I need to add a reference to the Toolkit on both projects, not only on the project who is using the component.