using System.Windows;
using Microsoft.Phone.Controls;
using System.IO;
using System.Windows.Media.Imaging;
using Microsoft.Xna.Framework;
using System.Reflection;

namespace WPLoadPictureContent
{
    public partial class MainPage : PhoneApplicationPage
    {
        public MainPage()
        {
            InitializeComponent();

            SupportedOrientations = SupportedPageOrientation.Portrait | SupportedPageOrientation.Landscape;
        }

        private void btnLoadPicture_Click(object sender, RoutedEventArgs e)
        {
            
            Stream stream = TitleContainer.OpenStream("DynamicImage.jpg");
            BitmapImage bi = new BitmapImage();
            bi.SetSource(stream);
            image1.Source = bi;
            stream.Close();
        }
    }
}