First time Error While working with Silverlight Pivot Viewer

Runtime Error in Silverlight Pivot Viewer

If you are working with Silverlight Pivot Viewer control for the first time and have created a basic Page using Pivot Viewer as explained here but still you are getting the Runtime error as shown below.

System.Windows.Markup.XamlParseException occurred
Message=Set property ‘System.Windows.FrameworkElement.Style’ threw an exception. [Line: 14 Position: 34]
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at SilverlightPivotViewer.MainPage.InitializeComponent()
at SilverlightPivotViewer.MainPage..ctor()
InnerException: System.Windows.Markup.XamlParseException
Message=Element is already the child of another element. [Line: 0 Position: 0]
at MS.Internal.XcpImports.CreateFromXaml(UnmanagedMemoryStream stream, String sourceAssemblyName, Boolean createNamescope, Boolean requireDefaultNamespace, Boolean allowEventHandlers)
at System.Windows.Controls.Control.GetBuiltInStyle(IntPtr nativeTarget, IntPtr& nativeStyle)

Then the quick resolution for this is to install Latest Silverlight tool kit (which is Apr 2010 release)

For resolving this error Download Silverlight Toolkit from here.

Leave a Reply

Your email address will not be published. Required fields are marked *