Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9064159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T16:10:44+00:00 2026-06-16T16:10:44+00:00

I am developing a windows store application, where I need to upload an image

  • 0

I am developing a windows store application, where I need to upload an image and save it in Assets folder. I am new in C#. Here is my code.

var picker = new FileOpenPicker();
            picker.SuggestedStartLocation = PickerLocationId.Desktop;
            picker.ViewMode = PickerViewMode.Thumbnail;
            picker.FileTypeFilter.Add(".jpg");
            picker.FileTypeFilter.Add(".jpeg");
            StorageFile file = await picker.PickSingleFileAsync();

            if (file == null) return;
            var stream = await file.OpenAsync(Windows.Storage.FileAccessMode.Read);
            BitmapImage image = new BitmapImage();
            image.SetSource(stream);
            imageTargetControl.Source = image;
            StorageFolder storageFolder = KnownFolders.DocumentsLibrary; 
            StorageFile copyFile = await file.CopyAsync(storageFolder);

Kindly help me.
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T16:10:45+00:00Added an answer on June 16, 2026 at 4:10 pm

    You can’t save it into your assets folder as you won’t have write permissions there.

    You must store it into one of the app data folders (LocalFolder, RoamingFolder, or TemporaryFolder).

    If you want to store the file anywhere else you can request additional permission for the application (such as permission to write in the photos library) but if you want to save somewhere that’s not a library you must ask the user where via a folderpicker dialog, and it’s the users choice.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a Windows Store Application (Windows 8). I have a need to
I am developing an application (Windows Store) to access SkyDrive content. To login to
I'm developing a windows store app using HTML and javascript. I need to login
I am developing a new web application for the Windows Azure cloud, but have
I am Developing Windows Form Application in .Net, I want to insert selected rows
I am developing Windows Phone 7 application in which I send encrypted data to
I am developing windows CE 6.0 for VIA board. I have a MFC application
I am developing a windows phone application. The webclient does not fire as I
i'm developing a windows form application.in the form, the left part is a tree
I'm developing a Windows application in VS2005 using C#. In my project, I generate

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.