In my silverlight mvvm application i am using wcf service to fill listbox which is taking time to load so i need to use async and await in that. how can i use it in the bellow code.
my code in view model:
private void GetLanguage()
{
ServiceAgent.GetLanguage((s, e) =>Language = e.Result);
}
my code in service agent
public void GetLanguage(EventHandler<languageCompletedEventArgs> callback)
{
_Proxy.languageCompleted += callback;
_Proxy.languageAsync();
}
Can anyone help me