title: How to Know which button clicked on Rg.Plugins.Popup
body: <p>I am using a Rg.Plugins.Popup PCL in Xamarin form and opening popup after button click. I want to know the process of which i can understand which button is clicked on the popup so  i can implement next part of code according to the selection on Popup.</p>
  
  <pre><code>&lt;pages:PopupPage xmlns="http://xamarin.com/schemas/2014/forms"
           xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
           xmlns:pages="clr-namespace:Rg.Plugins.Popup.Pages;assembly=Rg.Plugins.Popup"
           x:Class="ATSDriver.PopupDemo"&gt;
  &lt;ScrollView&gt;
      &lt;StackLayout VerticalOptions="Center" HorizontalOptions="FillAndExpand" BackgroundColor="#ffffff" &gt;
          &lt;StackLayout BackgroundColor="White" Padding="2"&gt;
              &lt;StackLayout VerticalOptions="Center"  HorizontalOptions="FillAndExpand" &gt;
                  &lt;Label Text="Order Item Picture " TextColor="Black" VerticalOptions="Center" &gt;&lt;/Label&gt;
              &lt;/StackLayout&gt;
              &lt;Button Text="Next Picture" x:Name="btnClose" Clicked="btnClose_Clicked" StyleClass="ButtonLightBlack"&gt;&lt;/Button&gt;
              &lt;Button Text="Complete Picture" x:Name="btnComplete" Clicked="btnClose_Clicked" StyleClass="ButtonLightBlack"&gt;&lt;/Button&gt;
          &lt;/StackLayout&gt;   
      &lt;/StackLayout&gt;
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>code of click event</strong> </p>
  
  <pre><code>private async void btnClose_Clicked(object sender, EventArgs e)
      {
          await Navigation.PopPopupAsync();
      }
  </code></pre>
  
  <p><strong>calling the popup</strong>
  Below code, I am using for the camera after taking the first picture i will open the above popup. If the user clicked on Next Picture then user an take next picture. If the user clicks on Complete picture i will close the camera and stop process. Currently i am using <code>DisplayAlert</code> but i want to use above popup. </p>
  
  <pre><code>async void bttnDelivery_Clicked1(object sender, EventArgs e)
      {
          try
          {
              var testPopup = new PopupDemo();
              await Navigation.PushPopupAsync(testPopup); 
  // var action2 = await DisplayAlert("Do you want to continue take pictures?", "", "Complete Pictures", "Next Picture");                
          }
          catch (Exception ex)
          {
  
          }
      }
  </code></pre>
  
  <p>Simply I want to change my below code part of Display Alert to use this Popup</p>
  
  <pre><code> var action2 = await DisplayAlert("Do you want to continue take pictures?", "", "Complete Pictures", "Next Picture");
                      if (action2 == false)
                      {
                          goto Pic;
                      }
                      if (action2 == true)
                      {
  }
  </code></pre>
  
  <p>Hope my questions is clear to you. Thanks in advance for your help</p>