in Education by
I'm using the progress bar of WPF and set the value until the max value. But, when reached, the animation (that's the green effect) continues. How can I stop it and have a full filled green bar, without any animation ? for example, take this : and : public partial class Window1 : Window { private double _min; private double _max; public Window1() { InitializeComponent(); } private void Window_Loaded(object sender, RoutedEventArgs e) { _min = progressBar1.Minimum; _max = progressBar1.Maximum; Thread thread = new Thread(Start); thread.Start(); } private void Start() { for (double i = _min; i <= _max; i++) { Thread.Sleep(50); double value = i; Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() => progressBar1.Value = value)); } } } When thread has finished, I can always see the animation on the progress bar (the white effect on the green bar) Thanks in advance for your help JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
I am not entirely sure what you mean, but perhaps what you need is to set the ProgressBar's IsIndeterminate property to false. If that does not work, then please give us some code to help you further! EDIT: The animation is part of the Windows Aero style and some designer was payed big bucks to ... err desgin it! So you cannot simply remove the animation using a property. You can alter the visual appearance of existing ProgressBars by editing their controltemplate. Below is the entire controltemplate of the WPF ProgressBar. Mind: you need all the Resources, the xmlns reference to Window.Themes and you must set a reference to the PresentationFramwork.Aero dll. I inserted a comment where you can make the change. Change the color FF000000 to 00000000 on the second and third gradientstops and the white glow disappears. I tried to implement a trigger that will show the animation at first, but stops it when Value==Maximum, but I failed. Someone else? <!-- This produces the whitish,moving glow-->

Related questions

0 votes
    Given my animation scene1. How can I pause it using a button named “Skip” using C# code behind, and play another animation scene2 after....
asked Dec 31, 2021 in Education by JackTerrance
0 votes
    I got this question regarding web server (such as nginx, Cherokee or Oracle iPlanet) and Java containers ( ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Aug 1, 2022 in Education by JackTerrance
0 votes
    In my first class i parse my xml file like this : class ListActeurs(): fonction_key = "DiagramElements" ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 2, 2022 in Education by JackTerrance
0 votes
    I am trying to POST a HTML (contained in a file) to a URL using Wget like this: wget -O- ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 17, 2022 in Education by JackTerrance
0 votes
    What is the difference between break statement and continue statement ? Select the correct answer from above options...
asked Dec 28, 2021 in Education by JackTerrance
0 votes
    Read the paragraph and answer the questions given below: Reproduction is the process by which the living species ... higher organisms? Select the correct answer from above options...
asked Nov 9, 2021 in Education by JackTerrance
0 votes
    If an index is _________________ the metadata and statistics continue to exists (a) Disabling (b) Dropping (c) ... in SQL in portion Indexing and Hashing of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
0 votes
    The transaction can no longer continue with its normal execution because of some internal condition, such ... topic in chapter Recovery System of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
0 votes
    The system has entered an undesirable state (for example, deadlock), as a result of which a ... Failure Classification in division Recovery System of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
0 votes
    How can I continue this rebase allowing unrelated histories with the forced flag introduced in the new release?...
asked Jan 8, 2021 in Technology by JackTerrance
0 votes
    What is break, continue and pass in Python?...
asked Dec 6, 2020 in Technology by JackTerrance
0 votes
    What is the purpose continue statement in python?...
asked Nov 25, 2020 in Technology by JackTerrance
+1 vote
    Which operator is used to continue the definition of macro in the next line in C-Programming?...
asked Nov 9, 2020 in Technology by JackTerrance
...