title: How to trim data from picker using xamarin
body: <p>I want to pass the part of data from picker like as parameter for api point.</p>
  <p>So for now picker have two properties - Station number &amp; Station name. I want to get first parameter (Station number) and pass to other method for api.</p>
  <p>From this method I want to get only the first property from the picker:</p>
  <p><a href="https://i.stack.imgur.com/nmhQu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nmhQu.png" alt="ScreenShot" /></a></p>
  <pre><code>public async Task FillStation_HQ_AHSAsync()
      {
          var result = await _restServiceStations.Get_HQ_AHS(GenerateRequestUriStations(Constants.EndPoint));
  
          //List for stations
          var stationsList = new List&lt;string&gt;();
  
          foreach (var item in result)
          {
              //Adding stations in list
              stationsList.Add(item.Station.ToString() + &quot; - &quot; + item.Ime.ToString());
          }
  
          //Filling picker with stations
          picker.ItemsSource = stationsList;
  
          //Make global string for picked station
          string pickStation = picker.SelectedItem.ToString();
          getStationNumber = pickStation;
  
          //Displaying date in entry
          DateTime dateNow =  DateTime.Now;
          entryDate.Text = dateNow.ToString(&quot;yyyy-MM-dd&quot;);
  
          //Displaying days before in entry
          entryDaysBefore.Text = 7.ToString();
  
          //Make global date time variable
          daysBeforeData = entryDaysBefore.Text;
      }
  </code></pre>
  <p>And want to pass the parameter on this method in <code>statNum</code>:</p>
  <pre><code>string GenerateRequestUri2(string endpoint, string dateAPI, string num, int statNum)
      {
          DateTime dateNow = DateTime.Now;
  
          dateAPI = dateNow.ToString(&quot;yyyy-MM-dd&quot;);
  
          num = daysBeforeData;
  
          string requestUri = endpoint;
          requestUri += &quot;/hqdataahs/GetData?&quot;;
          requestUri += $&quot;date={dateAPI}&amp;&quot;;
          requestUri += $&quot;num={num}&amp;&quot;;
          requestUri += $&quot;statNum={statNum}&quot;;
  
          return requestUri;
      }
  </code></pre>
  <p>How it's possible to get only the first item with selectedItem and How to do ?</p>