0

I have a progressBar control on page. All data getting by this.DefaultViewModel["Items"] = feedAllCinemas.Cinemas; where feeAllCinemas placed in another class.

I need to control visibility of progressBar in feedAllCinemas class.

TheX
  • 317
  • 5
  • 18
  • What property of feedAllCinemas trigger the visibility change? Use that property as the binding source of the ProgressBar's Visibility property, perhaps with a converter. – Jim O'Neil Apr 25 '13 at 01:23
  • you should take a look at this [Link](http://stackoverflow.com/a/7000922/1993545) – WiiMaxx Apr 25 '13 at 07:05

1 Answers1

1

One (dirty yet simple) way to do this is to pass the progress bar instance to the feedAllCinemas class.

class feedAllCinemas
{
   ProgressBar m_ProgressBar;

   public feedAllCinemas(ProgressBar pbar)
   {
        m_ProgressBar = pbar;
   }

   void someMethod()
   {
         m_ProgressBar.Visibility = Visibility.Collapsed;
   }
}
havardhu
  • 3,576
  • 2
  • 30
  • 42