You already have the necessary code underneath the
BeginInvoke
line, but commented out:
public async void XMPPClient_OnStateChanged(object sender, EventArgs e)
{
switch (xmppClient.XMPPState)
{
case XMPPState.Ready:
if (IsXmppSuccess)
{
await this.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
{
NavigationService.Navigate((new Uri("/Output.xaml?key=success", UriKind.Relative)));
}
}
}
}
According to
this StackOverflow answer[
^], the old APIs still exist for Silverlight apps, but not for Store apps.