title: Put doubleclick event to multiple pushpins from a text file in bing maps wpf
body: <p>I have no idea how to put doubleclick events to multiple pushpins that are initialized in the program itself(not in the xaml). The program will get lat and long data from a text file. 
  here's my current code: </p>
  
  <pre><code>public partial class BingMaps : Window
  {
      string role;
      string nick;
      int countLines=0;
  
      public BingMaps(string value,string role2)
      {
          InitializeComponent();
          nick = value;
          role = role2;
          setCount();
          int cLines = 0;
          Pushpin[] pushpins = new Pushpin [countLines];
  
          StreamReader z = new StreamReader("dorms.txt");
  
          while (z.Peek() &gt; 0)
          {
              var pushpinLayer = new MapLayer();
              pushpinLayer.Name = "PushPinLayer";
              intraMap.Children.Add(pushpinLayer);
              string line = z.ReadLine();
                      string[] temp = line.Split(new char[] { ';' });
              var location = new Location(double.Parse(temp[3]), double.Parse(temp[4]));
              var pushpin = new Pushpin();
  
              pushpin.Name = "MyNewPushpin";
              pushpin.Background = new SolidColorBrush(Colors.Blue);
              pushpin.Location = location;
              pushpin.ToolTip = "" + temp[0];
              pushpins[cLines] = pushpin;
              pushpinLayer.Children.Add(pushpins[cLines]);
  
              cLines = cLines + 1;
          }
  
          z.Close();
      }
  
      public void setCount()
      {
          using (StreamReader cRead = new StreamReader("dorms.txt"))
          {
              while (cRead.Peek() &gt; 0) { 
                  cRead.ReadLine();
                  countLines = countLines + 1;
              }
          }
      }   
  }               
  </code></pre>
  
  <p>i'm quite new to c# so please bear with me. I need to display different data for each pushpin.</p>