System.InvalidOperationException when event SelectionChanged is filled

5 posts, 1 answers
  1. Stephane
    Stephane avatar
    27 posts
    Member since:
    Mar 2009

    Posted 17 Mar 2011 Link to this post

    Hi,
    I use the lastest version of Radcontrol for Silverlight (2011 Q1) with VS2010 SP1.

    I have an error when i set the event "SelectionChanged", you can see the stacktrace of  exception:
    System.InvalidOperationException
    L'opération n'est pas valide en raison de l'état actuel de l'objet.
       à Microsoft.MetadataReader.MetadataOnlyTypeDef.MakeGenericType(Type[] argTypes)
       à Microsoft.VisualStudio.Shell.Design.TypeWrapper.MakeGenericType(Type[] typeArguments)
       à Microsoft.MetadataReader.ProxyGenericType.GetResolvedTypeWorker()
       à Microsoft.MetadataReader.TypeProxy.GetResolvedType()
       à Microsoft.MetadataReader.TypeProxy.GetHashCode()
       à Microsoft.Windows.Design.Metadata.ReflectionMetadataContext.GetTypeForReflectableType(Reflectable`1 reflectableType)
       à MS.Internal.Metadata.ClrType.GetTypeMetadata(Type type)
       à MS.Internal.Metadata.ClrEvent.get_EventHandlerType()
       à MS.Internal.Design.Metadata.ReflectionEventNode.get_PropertyType()
       à MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlProperty.get_PropertyType()
       à MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlProperty.get_IsComposite()
       à Microsoft.Windows.Design.DocumentModel.MarkupDocumentManagerBase.<EnumerateTreeTypes>d__20.MoveNext()
       à Microsoft.Windows.Design.DocumentModel.MarkupDocumentManagerBase.<EnumerateTreeTypes>d__20.MoveNext()
       à Microsoft.Windows.Design.DocumentModel.MarkupDocumentManagerBase.<EnumerateTreeTypes>d__20.MoveNext()
       à Microsoft.Windows.Design.DocumentModel.MarkupDocumentManagerBase.<EnumerateTreeTypes>d__20.MoveNext()
       à Microsoft.Windows.Design.DocumentModel.MarkupDocumentManagerBase.<EnumerateTreeTypes>d__20.MoveNext()
       à Microsoft.Windows.Design.DocumentModel.MarkupDocumentManagerBase.<EnumerateTreeTypes>d__20.MoveNext()
       à Microsoft.Windows.Design.DocumentModel.MarkupDocumentManagerBase.<EnumerateTreeTypes>d__20.MoveNext()
       à Microsoft.Windows.Design.DocumentModel.MarkupDocumentManagerBase.<EnumerateTreeTypes>d__20.MoveNext()
       à Microsoft.Windows.Design.DocumentModel.MarkupDocumentManagerBase.<EnumerateDamageTypes>d__31.MoveNext()
       à Microsoft.Windows.Design.DocumentModel.MarkupDocumentManagerBase.ReferenceUpdater.EnsureReferences(IEnumerable`1 types)
       à Microsoft.Windows.Design.DocumentModel.MarkupDocumentManagerBase.ReferenceUpdater.Microsoft.Windows.Design.DocumentModel.IDocumentTreeConsumer.HandleMessage(DocumentTreeCoordinator sender, MessageKey key, MessageArguments args)
       à Microsoft.Windows.Design.DocumentModel.MarkupDocumentManagerBase.CancelableDocumentTreeCoordinator.RouteMessage[T](IDocumentTreeConsumer consumer, MessageKey`1 key, T args)
       à Microsoft.Windows.Design.DocumentModel.DocumentTreeCoordinator.SendMessage[T](MessageKey`1 key, T args, Boolean isPrivateMessage)
       à Microsoft.Windows.Design.DocumentModel.DocumentTreeCoordinator.SendMessage[T](MessageKey`1 key, T args)
       à Microsoft.Windows.Design.DocumentModel.DocumentTreeCoordinator.ReportDamage(IDocumentTreeProducer tree, Damage damage)
       à Microsoft.Windows.Design.DocumentModel.MarkupProducer.Update()
       à Microsoft.Windows.Design.DocumentModel.MarkupProducer.HandleMessage(DocumentTreeCoordinator sender, MessageKey key, MessageArguments args)
       à Microsoft.Windows.Design.DocumentModel.MarkupProducer.Microsoft.Windows.Design.DocumentModel.IDocumentTreeConsumer.HandleMessage(DocumentTreeCoordinator sender, MessageKey key, MessageArguments args)
       à Microsoft.Windows.Design.DocumentModel.DocumentTreeCoordinator.SendMessage[T](MessageKey`1 key, T args, Boolean isPrivateMessage)
       à Microsoft.Windows.Design.DocumentModel.DocumentTreeCoordinator.QueuedMessage`1.Microsoft.Windows.Design.DocumentModel.IQueuedMessage.Invoke()
       à Microsoft.Windows.Design.DocumentModel.DocumentTreeCoordinator.ProcessQueuedMessages(Object state)
       à System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       à MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

    When Y set the name of the control (i.e. x:Name="RadTabControlBottom") , I cannot acces it in code behind. this controlis under a border compenent:
    <Border Grid.Row="2" BorderBrush="{Binding ElementName=button1, Path=BorderBrush}" BorderThickness="0,1,0,0">
     <telerik:RadTabControl x:Name="RadTabControlBottom" BorderBrush="{x:Null}" Background="Black" Style="{StaticResource HeaderRadTabControlStyle}" SelectionChanged="tabChanged">
    ...
     </telerik:RadTabControl>
    </Border>

    Could you help me?

    Best regards,
    Stephane.
  2. Answer
    FRITZ
    FRITZ avatar
    1 posts
    Member since:
    Jul 2010

    Posted 17 Mar 2011 Link to this post

    We are experiencing the same issue.  It appears to be the RadTabControl.  We created a new Telerik Silverlight template project, bulit, and then tried to add the RadTabControl to the project and received HRESULT:0x80004005(E_FAIL).

    Our existing project which already had the tab control would not allow us to view the Events tab of the Properties without throwing the error that Stephan mentioned.
  3. DevCraft banner
  4. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 18 Mar 2011 Link to this post

    Hello FRITZ,

    @ Stefane. We logged this issue in our PITS where you can track its status. We'll do our best to have this fixed for some of the internal builds in the next weeks. Please accept our apologies for the inconvenience caused.
    @Fritz. The events of the properties won't appear if you have defined a selection event handler in xaml which is related to the mentioned issue. Do you use SelectionChanged or PreviewSelectionChanged?
    When does H_Result error occur? Could you please elaborate more or send us a runnable sample if your first issue has nothing to do with the designer issue ? Thank you for your cooperation.


    Regards,
    Petar Mladenov
    the Telerik team
  5. Dennis
    Dennis avatar
    1 posts
    Member since:
    Dec 2010

    Posted 02 May 2011 Link to this post

    OH,I've the same problem if I set the SelectionChanged.And when I removed this event.everything is ok.Could you help me?
  6. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 03 May 2011 Link to this post

    Hi FRITZ,

    This issue is fixed and you can use the official  Q1 SP1 version of RadControls 0419. Let us know if you need further assistance.

    Best wishes,
    Petar Mladenov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
DevCraft banner