title: Changing isVisible property of Xamarin Forms XAML buttons
body: <p>I am trying to dynamically show/hide button inside Xamarin Forms ContentPage.
  I have two buttons in my XAML code:</p>
  
  <pre><code>&lt;StackLayout Orientation="Vertical"&gt;
  
      &lt;Button x:Name="start_btn" Clicked="startPanic"&gt;
          &lt;Button.Text&gt;START&lt;/Button.Text&gt;
      &lt;/Button&gt;
  
      &lt;Button x:Name="stop_btn" IsVisible="false"&gt;
          &lt;Button.Text&gt;STOP&lt;/Button.Text&gt;
      &lt;/Button&gt;
  
  &lt;/StackLayout&gt;
  </code></pre>
  
  <p>Corresponding C# code:</p>
  
  <pre><code>public partial class PanicPage : ContentPage
  {
      private Button startBtn;
      private Button stopBtn;
  
      public PanicPage ()
      {
          InitializeComponent ();
          startBtn = this.FindByName&lt;Button&gt; ("start_btn");
          stopBtn = this.FindByName&lt;Button&gt; ("stop_btn");
      }
  
      private void startPanic(object sender, EventArgs args){
          Device.BeginInvokeOnMainThread (() =&gt; {
              startBtn.IsVisible = false;
              stopBtn.IsVisible = true; //  DOESN'T WORK, button still will be hidden
          });
      }
  }
  </code></pre>
  
  <p>When I set isVisible property in XAML, it doesn't react for any property change in event method (startPanic). How can I fix it?</p>