0

This api was accessed with arguments from the wrong context

Niteen 9 years ago updated by Asdf Fdsa 3 years ago 2
Hello,

We are adding and removing the ModelVisual3D object using background worker process and we got the the following error message:

Error : "This api was accessed with arguments from the wrong context"

Here is my code:

Private Sub backgroundWorker_ProgressChanged(sender As Object, e As ProgressChangedEventArgs)

Dim list = helixViewport3D.Children.OfType(Of ModelVisual3D).ToList()
For Each item As ModelVisual3D In list
If TypeOf item Is ModelVisual3D AndAlso item.GetName() = "Mesh" Then
helixViewport3D.Children.Remove(item)
End If
Next
Dim visual = CType(e.UserState, ModelVisual3D)
helixViewport3D.Children.Add(visual)
End Sub

We are used the BackgroundWorker thread to update the UI from background process. Can you please suggest how to solve this issue.

Please find the attached screem shot.


Thanks,
Niteen Patil







Please find the attached screen shot for above message.


Please suggest the solution.

Thanks,

These are great wise words from the voice of experience and talented person like you! Thank your for sharing all of this and more motivating us.

gold diamond gaming

ทางเข้าเล่นคาสิโนgold diamond gaming

ทางเข้าเล่นgdg casino