 <p>It is probably because you are not calling the method from UI thread. Try using Dispatcher.BeginInvoke:</p> <pre class="lang-cs prettyprint-override"><code>Dispatcher.BeginInvoke(()=&gt; { tbl1.Text = ""; tbl1.Visibility = System.Windows.Visibility.Collapsed; }); </code></pre>