<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[איך לעדכן progressBar ב- wpf במשך פעולת async]]></title><description><![CDATA[<p dir="auto">לאחרונה היה לי צורך לעשות progressBar ב- wpf שמתדעכן במשך פעולת async<br />
לאחר שביררתי את הנושא מישהו הביא לי את הדרך דלהלן (זה עובד הרבה יותר טוב מdispatcher שתוקע קצת את החלון שבו הוא פועל)</p>
<hr />
<p dir="auto">יוצרים progressreporter</p>
<pre><code> IProgress&lt;double&gt; progressReporter = new Progress&lt;double&gt;(OnProgressChanged);
</code></pre>
<p dir="auto">ו-יוצרים לזה Void</p>
<pre><code>  private void OnProgressChanged(double progressValue)
  {
      progressBar.Value += 1;
  }
</code></pre>
<p dir="auto">ואז פשוט תוך כדי הפעולה</p>
<pre><code>progressReporter.Report(1);
</code></pre>
<p dir="auto">ולאיפוס של הprogressbar</p>
<pre><code>progressReporter.Report(-1);
</code></pre>
<p dir="auto">מקווה שלמישהו יהיה תועלת מזה בהצלחה.</p>
]]></description><link>https://tchumim.com/topic/16048/איך-לעדכן-progressbar-ב-wpf-במשך-פעולת-async</link><generator>RSS for Node</generator><lastBuildDate>Sat, 16 May 2026 19:55:12 GMT</lastBuildDate><atom:link href="https://tchumim.com/topic/16048.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 07 Feb 2024 20:54:51 GMT</pubDate><ttl>60</ttl></channel></rss>