I'm developing a Windows Phone 8.1 app and when I try to search for users using linqtotwitter, I get this error: "The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD))"
This is my code:
var users = new List<UserItem>();
                var foundUsers =
                    await
                        (from user in twitterCtx.User
                            where user.Type == UserType.Search &&
                                  user.Query == SearchBox.Text
                            select user)
                            .ToListAsync();
                foreach (var foundUser in foundUsers)
                {
                    var user = new UserItem();
                    user.Id = Convert.ToUInt64(foundUser.UserIDResponse);
                    user.ProfileImageSource = foundUser.ProfileImageUrl.Replace("_normal", "");
                    user.ScreenName = foundUser.ScreenNameResponse;
                    user.UserName = foundUser.Name;
                    users.Add(user);
                }
                ListPeople.ItemsSource = users;
I get the same error when trying to show statuses from a list. I also tried to insert a dispatcher but I got the same error.
User contributions licensed under CC BY-SA 3.0