Adding TimelineBand Causes COM Error (Silverlight 4)

Jun 16, 2010 at 5:43 AM

I recently downloaded the control and attempted to use it. Firstly, I tried putting downloading the DLL and putting it straight in to my Xap package but that didn't work so I compiled the code for Silverlight 4 and followed the instructions here:

http://timeline.codeplex.com/wikipage?title=Use%20the%20Control%20from%20Silverlight&referringTitle=User%20Documentation

But I immediately got this error in the VS 2010 designer:

System.InvalidOperationException
An unhandled exception was encountered while trying to render the current silverlight project on the design surface. To diagnose this failure, please try to run the project in a regular browser using the silverlight developer runtime.
   at Microsoft.Windows.Design.Platform.SilverlightViewProducer.OnUnhandledException(Object sender, ViewUnhandledExceptionEventArgs e)
   at Microsoft.Expression.Platform.Silverlight.SilverlightPlatformSpecificView.OnUnhandledException(Object sender, ViewUnhandledExceptionEventArgs args)
   at Microsoft.Expression.Platform.Silverlight.Host.SilverlightImageHost.<>c__DisplayClass1.<Application_UnhandledException>b__0(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

 
System.Exception
Error HRESULT E_FAIL has been returned from a call to a COM component.
   at MS.Internal.XcpImports.VisualStateManager_GoToState(Control reference, String StateName, Boolean useTransitions, Boolean& refreshInheritanceContext)
   at System.Windows.VisualStateManager.GoToState(Control control, String stateName, Boolean useTransitions)
   at System.Windows.Controls.Button.ChangeVisualState(Boolean useTransitions)
   at System.Windows.Controls.Primitives.ButtonBase.<.ctor>b__0(Object , RoutedEventArgs )
   at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)

 

So, I stripped back all the values to this and it works fine but of course nothing is displayed:

    <timeline:TimelineTray>
        <Grid.RowDefinitions>
            <RowDefinition Height="80" />
            <RowDefinition Height="80" />
        </Grid.RowDefinitions>               
    </timeline:TimelineTray

As soon as I add a TimelineBand, I get the error above.

<timeline:TimelineBand IsMainBand="True" />

 

 

Coordinator
Jun 16, 2010 at 4:47 PM
Are you using code from sources or from downloads? Use it from sources for SL4. If this is not working please open a bug and attach sample which is not working.
Jun 18, 2010 at 1:22 AM

Andrew,

Thanks for your reply, but I don't undertstand. I tried both downloading the DLL and the source. I downloaded the source from http://timeline.codeplex.com/releases/view/35778. But, I didn't see any link to download the Silverlight 4 code.

Christian



From: [email removed]
To: [email removed]
Date: Wed, 16 Jun 2010 08:47:52 -0700
Subject: Re: Adding TimelineBand Causes COM Error (Silverlight 4) [timeline:216160]

From: andrewsyrov
Are you using code from sources or from downloads? Use it from sources for SL4. If this is not working please open a bug and attach sample which is not working.
Read the full discussion online.
To add a post to this discussion, reply to this email (timeline@discussions.codeplex.com)
To start a new discussion for this project, email timeline@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Find it on Domain.com.au Need a new place to live?
Jun 18, 2010 at 1:39 AM

Andrew,

Actually, I have a feeling that the two download links download different code. I downloaded the latest build (49462) and now it seems to work fine. The code is for VS 2010 Silverlight 4.

Christian

Aug 17, 2010 at 11:31 AM

I have downloaded the code from http://timeline.codeplex.com/SourceControl/list/changesets (Change Set 54157) and am getting the same error as mentioned earlier by Kruddler. I tool the TimelineLibrary.dll from the TimeLineLibrary project, and added a reference to it in my project. As soon as I add a TimeLineBand, I get the exception:

System.InvalidOperationException

An unhandled exception was encountered while trying to render the current silverlight project on the design surface. To diagnose this failure, please try to run the project in a regular browser using the silverlight developer runtime.

at Microsoft.Windows.Design.Platform.SilverlightViewProducer.OnUnhandledException(Object sender, ViewUnhandledExceptionEventArgs e) at Microsoft.Expression.Platform.Silverlight.SilverlightPlatformSpecificView.OnUnhandledException(Object sender, ViewUnhandledExceptionEventArgs args) at Microsoft.Expression.Platform.Silverlight.Host.SilverlightImageHost.<>c__DisplayClass1.<Application_UnhandledException>b__0(Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

 

System.Exception

Error HRESULT E_FAIL has been returned from a call to a COM component.

at MS.Internal.XcpImports.VisualStateManager_GoToState(Control reference, String StateName, Boolean useTransitions, Boolean& refreshInheritanceContext) at System.Windows.VisualStateManager.GoToState(Control control, String stateName, Boolean useTransitions) at System.Windows.Controls.Button.ChangeVisualState(Boolean useTransitions) at System.Windows.Controls.Primitives.ButtonBase.<.ctor>b__0(Object , RoutedEventArgs ) at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args) at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)

Coordinator
Aug 17, 2010 at 3:45 PM
Can you open a bug and attach a solution with error to it. I will investigate.
Dec 17, 2010 at 7:41 PM
I have the very same issue. To reproduce the problem; switch over from silverlight 3 to 4. Then you will se the exception. Please update the code since this project seems to be of great value! Thanks, Martin
Coordinator
Dec 19, 2010 at 12:57 AM

You got it. Version 2 Beta is in downloads. Doc is also slightly updated.