Progressiring is not shown

Asked

Viewed 21 times

1

I need to show the progressringduring the execution of a task, but it does not appear and the screen is frozen until the execution of the task.

        private async void btn_Criar_Click(object sender, RoutedEventArgs e)
    {
        pgr_Carregando.IsActive = true;
        if (Fitas == null)
            Fitas = new ObservableCollection<Fitas>();

        await Set_Listas();
        pgr_Carregando.IsActive = false;
        this.Frame.Navigate(typeof(MainPage), Fitas);
    }

    private Task Set_Listas()
    {
        string path = Path.Combine(Windows.ApplicationModel.Package.Current.InstalledLocation.Path, @"Assets\bd.db");
        Fitas = SG_Classes.Fitas.Popular_Fitas(path);
        return Task.CompletedTask;
    }
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.