title: Passing strings from an Activity to a DialogFragment
body: <p>in my activity I have this:</p>
  
  <p>public class MainActivity : Activity
      {
          RelativeLayout mRelativeLayout;
          Button mButton;
          private Button mBtnSignUp;</p>
  
  <pre><code>    protected override void OnCreate(Bundle bundle)
      {
          base.OnCreate(bundle);
  
          // Set our view from the "main" layout resource
          SetContentView(Resource.Layout.Main);
  
          mRelativeLayout = FindViewById&lt;RelativeLayout&gt;(Resource.Id.mainView);
          mButton = FindViewById&lt;Button&gt;(Resource.Id.btnLogin);
  
          mButton.Click += mButton_Click;
          mRelativeLayout.Click += mRelativeLayout_Click;
  
          mBtnSignUp = FindViewById&lt;Button&gt; (Resource.Id.button1);
          mBtnSignUp.Click += (object sender, EventArgs e) =&gt; 
          {
                  //Pull up dialog
                  FragmentTransaction transaction = FragmentManager.BeginTransaction();
                  dialog_SignUp signUpDialog = new dialog_SignUp();
                  signUpDialog.Show(transaction, "dialog fragment");
  
                  signUpDialog.mOnSignUpComplete += signUpDialog_mOnSignUpComplete;
          };
          void signUpDialog_mOnSignUpComplete (object sender, OnSignUpEventArgs e)
          {
  
              Thread thread = new Thread (ActLikeARequest);
              thread.Start ();
  
  
          }
          private void ActLikeARequest()
          {
  
              Thread.Sleep (3000);
          }
  </code></pre>
  
  <p>And in the dialog I have:</p>
  
  <pre><code>public class OnSignUpEventArgs : EventArgs
      {
          private string mFirstName;
          private string mEmail;
          private string mPassword;
  
          public string FirstName
          {
              get{ return mFirstName; }
              set{ mFirstName=value;}
  
          }
          public string Email
          {
              get{ return mEmail; }
              set{ mEmail=value;}
  
          }
          public string Password
          {
              get{ return mPassword; }
              set{ mPassword=value;}
  
          }
  
          public OnSignUpEventArgs (string firstName, string email, string password) : base()
          {
              FirstName = firstName;
              Email = email;
              Password = password;
          }
  
      }
  
      class dialog_SignUp:DialogFragment
      {
          private Button mBtnSignUp;
          private EditText mFirstName;
          private EditText mEmail;
          private EditText mPassword;
  
          public event EventHandler&lt;OnSignUpEventArgs&gt; mOnSignUpComplete;
  
  
          public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
          {
              base.OnCreateView (inflater, container, savedInstanceState);
  
              var view = inflater.Inflate (Resource.Layout.dialog_sign_up, container, false);
  
              mBtnSignUp = view.FindViewById&lt;Button&gt; (Resource.Id.btnDialogEmail);
              mFirstName = view.FindViewById&lt;EditText&gt; (Resource.Id.txtFirstName);
              mEmail = view.FindViewById&lt;EditText&gt; (Resource.Id.txtEmail);
              mPassword = view.FindViewById&lt;EditText&gt; (Resource.Id.txtPassword);
  
              mBtnSignUp.Click += mBtnSignUp_Click;
  
  
  
              return view;
          }
  
          void mBtnSignUp_Click (object sender, EventArgs e)
          {
  
              //User has clicked the sign up button
  
              mOnSignUpComplete.Invoke (this, new OnSignUpEventArgs(mFirstName.Text, mEmail.Text, mPassword.Text));
              this.Dismiss ();
  
          }
          public override void OnActivityCreated (Bundle savedInstanceState)
          {
              Dialog.Window.RequestFeature (WindowFeatures.NoTitle); //Sets the title bar to invisible
              base.OnActivityCreated (savedInstanceState);
              Dialog.Window.Attributes.WindowAnimations = Resource.Style.dialog_animation; //Set the animation
          }
      }
  </code></pre>
  
  <p>The question is, how can I pass data(strings) from the activity into the dialog, so that when it is called, the TextViews get the data I'm passing?</p>
  
  <p>Is it something to add in the actitity,  but what?</p>