有人能举例说明如何使用该方法开始向用户显示提示加载... 使用下面的代码我使用Completed事件放置查询,使用方法作为Begin?
service.EventosDoDiaCompleted += RecebeEventos;
service.EventosDoDiaAsync();
private void RecebeEventos(object sender, AsyncCompletedEventArgs e)
{
Dataset ds = service.EventosDoDia();
}
答案 0 :(得分:2)
只需放置简单的Textblock或类似的东西:
service.EventosDoDiaCompleted += RecebeEventos;
textblock.Text="Loading....";
service.EventosDoDiaAsync();
private void RecebeEventos(object sender, AsyncCompletedEventArgs e)
{
textblock.Text="Loaded";
Dataset ds = service.EventosDoDia();
}