title: Collapsed Grid visibility from class in windows phone 8.1
body: <p>I am currently working with windows phone 8.1 [RT] application , In my application I have hide Grid Visibility from class.
  For that I have create one public method on cs page </p>
  
  <pre><code>public void HideCancelButton()
  {
      grdCancle.Visibility = Visibility.Collapsed;
      bdrCancel.Visibility = Visibility.Collapsed;
      Debug.WriteLine("hide button");
      //UpdateLayout();
  }
  </code></pre>
  
  <p>and calld that method in following manner in helperClass.cs </p>
  
  <pre><code> MainPage mypage = new MainPage();
   mypage.HideCancelButton();
  </code></pre>
  
  <p>it will debug "hide button" but doesn't hide grid </p>
  
  <p>I have also use </p>
  
  <pre><code> await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal,() =&gt;{});
  </code></pre>