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 9227773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:09:43+00:00 2026-06-18T05:09:43+00:00

This is for my Windows 8 app: In my object I have a string

  • 0

This is for my Windows 8 app:

In my object I have a string property that contains the path of the images I want to use.

public String ImagePath

In my XAML I have set up an Image tag with the following binding:

<Image Source="{Binding ImagePath}" Margin="50"/>

When I reference an image that I’ve included in my project (in the Asset folder) the image displays correctly. The path is: Assets/car2.png

However, when I reference an image that the user selects (using the FilePicker) I get an error (and no image). The path is: C:\Users\Jeff\Pictures\myImage.PNG

Converter failed to convert value of type ‘Windows.Foundation.String’
to type ‘ImageSource’

Just to add a little more info. When I use the file picker I am converting the file location to a URI:

        Uri uriAddress =  new Uri(file.Path.ToString());
        _VM.vehicleSingle.ImagePath = uriAddress.LocalPath;

Update:

I’m also saving this image path to isolated storage. I think this is where the issue is. I’m able to save the path of the file selected, but when I try to bind to it when I’m reloading the Isolated Storage it doesn’t work.

So if I can’t use an image outside of the application directory. Is there a way I can save that image and add it to the directory?

I tried creating a BitmapImage property to my model but now I’m getting errors stating that it can’t serialize a BitmapImage.

  • 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-18T05:09:44+00:00Added an answer on June 18, 2026 at 5:09 am

    You should Use Converter

    public class ImageConverter : IValueConverter
        {
            public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
            {
                MemoryStream memStream = new MemoryStream((byte[])value,false);
                BitmapImage empImage = new BitmapImage();
                empImage.SetSource(memStream);
                return empImage;
            }
    
            public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
            {
                throw new NotImplementedException();
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a .NET application that contains a checkbox (System.Windows.Forms.Checkbox). This component (WindowsForms10.BUTTON.app.0.378734a1) is
This is the situation. I have a windows form app that uses an access
I have this windows app Cafe that allows the user to make their selection
I have a windows service containing this code: public static void ExtractTextInner(string source, string
what i'm trying to do this this. Simply create a C# windows app that
I am building an app for Windows Phone, and in this app I have
I have a web application running on Windows IIS. This app has a database
I have a Windows Forms App that loads a dll @ runtime and executes
I'm working on a sound recorder app for Windows 8, and have noticed that
Let's say we have a Windows app that has a TreeView and you can

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.