How can I add a progressbar in listview in wpf (Progressbar value changes as the file is downloads)

Nehal Chaudhari 41 Reputation points
2022-01-22T08:00:51.767+00:00

167374-screenshot-2022-01-22-132359.png

Other items are adding correctly but progressbar is not working
what can I do?

I want to progressbar for each row.

Developer technologies Windows Presentation Foundation
Developer technologies C#
0 comments No comments
{count} votes

Accepted answer
  1. Karen Payne MVP 35,586 Reputation points Volunteer Moderator
    2022-01-22T10:11:29.257+00:00

    Without source code its impossible to provide a solution to what you have. So check out the following focusing on threading

    if (!Dispatcher.CheckAccess())
    {
        Dispatcher.Invoke(() =>
        {
             progressBar.Value = int.Parse(Math.Truncate(percentage).ToString());
        });
    }
    else
    {
         progressBar.Value = int.Parse(Math.Truncate(percentage).ToString());
    }
    
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Castorix31 90,521 Reputation points
    2022-01-22T11:12:21.173+00:00

    You can find samples from Google, like :

    Using progress bar inside the List view

    depreciation.gif

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.