win8 metro读取图片

         FileOpenPicker openPicker = new FileOpenPicker();

                openPicker.ViewMode = PickerViewMode.Thumbnail;

                openPicker.SuggestedStartLocation = PickerLocationId.PicturesLibrary;

                openPicker.FileTypeFilter.Add(".jpg");

                openPicker.FileTypeFilter.Add(".jpeg");

                openPicker.FileTypeFilter.Add(".png");

                ImageUploadButon.IsEnabled = false;

                SelectedProgressRing.IsActive = true;

                StorageFile file = await openPicker.PickSingleFileAsync();

                

                if (null != file)

                {

                    userTxt.Text = file.Name;



                    using (Stream stream = await file.OpenStreamForReadAsync())

                    {

你可能感兴趣的:(metro)