Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6614953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:24:08+00:00 2026-05-25T20:24:08+00:00

I’ve noticed that there is a difference in the time it takes for a

  • 0

I’ve noticed that there is a difference in the time it takes for a WPF Progress Bar and a WinForms Progress Bar to fill completely.

Fill completely as in set the Value to 100 in both Forms and WPF, one can notice that WinForms fills the bar smoothly whereas the WPF fills it instantly.

I wanted to know if there is a property that we can edit in the templates to change that.

Hope I made it clear, I can post a video too if anyone wants.

EDIT

Here’s a video of what I’m talking about, notice the difference ?

EDIT 2

Filling the progress bar with a timer ?

using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media.Animation;

namespace WpfApplication2
{
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            this.InitializeComponent();
            this.Title = "WPF Progress Bar Demo";
        }

        private void fill(int from, int to)
        {
            Duration duration = new Duration(TimeSpan.FromSeconds(0.5));
            DoubleAnimation doubleanimation = new DoubleAnimation(from, to, duration);
            progb.BeginAnimation(ProgressBar.ValueProperty, doubleanimation);
        }

        private void fill_Click(object sender, RoutedEventArgs e)
        {
            fill(0, 100);
        }
    }
}

Is that OK and will it work anywhere ?

Feel free to change it.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T20:24:09+00:00Added an answer on May 25, 2026 at 8:24 pm

    It looks like it’s a problem (or not) with only WPF progress bar…another user reported it here

    1. WPF Control, exactly progress bar, does not update itself when
      copying When I test to copy a big file, the complete GUI just
      completely freezes. The progress bar doesn’t run smoothly. It just
      jumps from 0 to 100.

    It was solved by adding an extension method:

     //Your Code
        pbBar.Value = some_value;
        pbBar.Refresh();
     //Your Code
    
    public static class ExtensionMethods
    {
        private static Action EmptyDelegate = delegate() { };
        public static void Refresh(this UIElement uiElement)
        {
            uiElement.Dispatcher.Invoke(DispatcherPriority.Render, EmptyDelegate);
        }
    
        public static void RefreshInput(this UIElement uiElement)
        {
            uiElement.Dispatcher.Invoke(DispatcherPriority.Input, EmptyDelegate);
        }
    }
    

    Calling the Refresh() method after setting the value solved the issue.

    But, what I found was even after applying the refresh() method, the progress bar jumps on each run (from different values).

    Using a backgroundworker and reportprogress gives the exact result with no "jumps".

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I need a function that will clean a strings' special characters. I do NOT
I'm trying to create an if statement in PHP that prevents a single post
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I am trying to understand how to use SyndicationItem to display feed which is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.