title: How can i Share an image without saving it to Gallery in Windows Phone 8?
body: <p>I'm using ShareMediaTask to share an image.I'm able to do this after saving an image to my Phone gallery but i want it directly before saving it to gallery. How can i do this ? I have done this but i dont want that photo chooser task open before sharing, i want directly it share.</p>
  
  <pre><code>    private void mnuShare_Click(object sender, EventArgs e)
      {
  
           using (MemoryStream stream = new MemoryStream())
          {
              WriteableBitmap bitmap = new WriteableBitmap(LayoutRoot, null);
              bitmap.SaveJpeg(stream, bitmap.PixelWidth, bitmap.PixelHeight, 0, 100);
              stream.Seek(0, SeekOrigin.Begin);
  
              using (MediaLibrary mediaLibrary = new MediaLibrary())
                  mediaLibrary.SavePicture("Picture.jpg", stream);
  
          }
         MessageBox.Show("Picture Saved...");
          var chooser = new Microsoft.Phone.Tasks.PhotoChooserTask();
          chooser.Completed += chooser_Completed;
         chooser.Show();
        _fileName = e.ToString();
  
      }
      void ShowShareMediaTask(string path)
      {
          ShareMediaTask shareMediaTask = new ShareMediaTask();
          shareMediaTask.FilePath = path;
          shareMediaTask.Show();
      }
      void chooser_Completed(object sender, PhotoResult e)
      {
          _fileName = e.OriginalFileName.ToString();
          if (e.TaskResult == TaskResult.OK)
          {
              ShareMediaTask shareMediaTask = new ShareMediaTask();
  
              shareMediaTask.FilePath = _fileName;
              shareMediaTask.Show();
  
          }
  </code></pre>