title: How to pass a value to the UserControl (uwp)
body: <p>How to pass a value to the UserControl (uwp)</p>
  
  <pre><code>&lt;Pivot Title="Welcome" Name="View_P" SelectionChanged="Pivot_SelectionChanged" &gt;
      &lt;PivotItem Header="Car" Name="v_1"&gt;
          &lt;local:View_Control /&gt;
              &lt;/PivotItem&gt;
  
              &lt;PivotItem Header="electronics"&gt;
          &lt;local:View_Control/&gt;
      &lt;/PivotItem&gt;
  &lt;/Pivot&gt;
  </code></pre>
  
  <p>See in PivotItem0 and PivotItem0 </p>
  
  <pre><code>&lt;local:View_Control/&gt;
  </code></pre>
  
  <p>next code c#</p>
  
  <pre><code>private void Pivot_SelectionChanged(object sender, SelectionChangedEventArgs e)
  {
      if( View_P.SelectedIndex == 0)
      {
          View_Control.numbers=1
      }
      else if (View_P.SelectedIndex == 0)
      {
          View_Control.numbers = 2
      }
  }
  </code></pre>
  
  <p>next code UserControl Name page (View_Control)</p>
  
  <pre><code>public  int numbers;
  public View_Control()
  {
      ServiceErkaanClient dv = new ServiceErkaanClient();
      this.InitializeComponent();
      MyGrid1.ItemsSource = dv.SP_All_SellAsync(numbers).Result;
  }
  </code></pre>
  
  <p>Required
  If click Pivot SelectedIndex == 0 sends a parameter to UserControl (View_Control) 1 and Refresh </p>