Win8 C#Metro调度程序和RPC_E_WRONG_THREAD

use*_*906 2 c# microsoft-metro windows-8

我正在尝试使用非官方的Google音乐API在Windows 8 metro界面中为.net构建一个应用程序.我正在加载整个播放列表

foreach (GoogleMusicPlaylist p in pls.UserPlaylists)
                lbPlaylists.Items.Add(p.Title);
Run Code Online (Sandbox Code Playgroud)

它出现了这个错误

HRESULT: 0x8001010E (RPC_E_WRONG_THREAD))
Run Code Online (Sandbox Code Playgroud)

我在互联网上阅读,也许我必须使用调度员或其他我一般都很困惑的东西.

Ind*_*ore 6

用这个

Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
            {
                foreach (GoogleMusicPlaylist p in pls.UserPlaylists)
                {
                    lbPlaylists.Items.Add(p.Title);
                }
            });
Run Code Online (Sandbox Code Playgroud)