1

Can someone give me an example of how to use the method begin to display an alert to the User saying Loading ... With the code below I place the query using the Completed event, use the method as Begin?

service.EventosDoDiaCompleted += RecebeEventos;
service.EventosDoDiaAsync();

private void RecebeEventos(object sender, AsyncCompletedEventArgs e)
{
   Dataset ds = service.EventosDoDia();
}
4

1 に答える 1

2

単純な Textblock または次のようなものを配置するだけです。

    service.EventosDoDiaCompleted += RecebeEventos;
    textblock.Text="Loading....";
    service.EventosDoDiaAsync();
    private void RecebeEventos(object sender, AsyncCompletedEventArgs e)
    {
        textblock.Text="Loaded";
        Dataset ds = service.EventosDoDia();
    }
于 2013-03-04T12:21:01.660 に答える