Welcome to the Windows Central Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Results 1 to 2 of 2
  1.    #1  
    Hey everyone, I'm trying to develop my first Windows Phone 8 app, and I had a question that I can't find any answers to online:

    for the time being, I'm trying to create a basic list that just displays thumbnails of photos the user has selected using the photo chooser in WP8 How to use the photo chooser task for Windows Phone

    I'm able to display photo thumbnails if I use a URI from a website url, but I can't display an image when trying to get the file path from the device. Here's some of the basics (I have an object that essentially just has the uri string for an image source)

    <ListBox Name="lstbox" Grid.Row="1" Margin="10, 10, 10, 10">
    <ListBox.ItemTemplate>
    <DataTemplate>
    <StackPanel Orientation="Horizontal" Height="80" Width="400">
    <Image Source="{Binding ImageSource}" Width="80" Height="80"/>
    </StackPanel>
    </DataTemplate>
    </ListBox.ItemTemplate>
    </Listbox>

    myImages.Add(new myImage(new Uri("http://www.google.com.au/logos/classicplus.png"))); <----- works fine, displays an image from a website

    what does NOT work is doing something like this using the photo chooser:

    void photoChooserTask_Completed(object sender, PhotoResult e)
    {
    if (e.TaskResult == TaskResult.OK)
    {
    myImages.Add(new myImage( new Uri(e.OriginalFileName)));
    }
    }


    can someone please help me with this?
  2. theomodsim's Avatar
    Developer

    Posts
    56 Posts
    Global Posts
    146 Global Posts
    #2  
    Is "myImage" (seen in the code above when you call the constructor "new myImage...") a class that you defined? If so, can you provide the code for the ImageSource property?
    My apps:
    Share your phone's internet connection with other devices: ConnectionShare
    Google Cloud Printing from your phone: KumoPrint
    Multi-language offline dictionary application: HoshiDict
    Browser with integrated translation and word lookup tools (perfect for language learning): Tap2Trans Browser

Similar Threads

  1. I got a response from Elop on Lumia 920 Daytime photo quality.
    By chrgeorgeson in forum Nokia Lumia 920
    Replies: 32
    Last Post: 11-11-2012, 01:38 PM
  2. Purchased app not showing up on device
    By mrasmussen in forum Windows Phone 7
    Replies: 4
    Last Post: 05-30-2011, 12:43 AM
  3. Background image on Pictures
    By ikkf in forum Windows Phone 7
    Replies: 7
    Last Post: 05-17-2011, 09:56 AM

Posting Permissions