Click here to Skip to main content
15,892,059 members
Articles / Mobile Apps / Windows Mobile

Using Flickr Data Source in Windows Phone App Studio

Rate me:
Please Sign up or sign in to vote.
4.33/5 (2 votes)
21 Jan 2014CPOL4 min read 5.2K   3  
Using Flickr data source in Windows Phone app studio

Image 1

Introduction

In this article, we will create a Flickr album viewer using Windows Phone App Studio. In my previous articles, we learned how to use a YouTube Data Source in Windows Phone App Studio. In this article, we will learn about a Flickr Data Source.

About Flickr Data Source

This Data Source is similar to a YouTube Data Source. You need to enter the search keyword or user id. The Data Source will automatically grab the pictures from the Flickr website. If you choose the search option, then the result will be the same as when you get it by searching in the website. If you select the “user” option, then the application will show the images from that Flickr user account.

Finding Flickr User ID

If you want to integrate any user account with this Data Source, then you need to find the user id of that account. The best way to find the user is using this tool.

  • User ID

    Image 2

  • Enter the user profile URL and you will get the User Id associated with that account.

    Image 3

Creating Flickr Album Viewer

So now it’s time for action. Let’s start building our app in a step-by-step manner.

  1. Open this link to launch Windows Phone App Studio http://apps.windowsstore.com/default.htm
  2. Click on “Start Building”
  3. Click on “Create an Empty Application”.
  4. Set the App logo. It should be good enough to reflect your App motive.
  5. Set the App title and Description. The App title is what will be visible on the Phone App list. Now click “Next”.
  6. Click on “Add section” and select “Add section” from the pop-up.
  7. Enter a section name. This will be visible on the App main screen.
  8. Select the Data Source type as “Flickr”.
  9. Enter the Data Source name. It should be unique within the application. To save changes, click “Save Changes”.

    Image 4

  10. To show the details of an image, let’s add one more detail page.
  11. To add a detail page, click on the “+ Add Page” icon.
  12. Enter the page name and click “Ok”.

    Image 5

  13. Click on “Save changes” to save the settings.
  14. Now click on the Data Source we have added.

    Image 6

  15. Select “Search” from the drop down list as we will be using a search keyword for this application.

    Image 7

  16. Enter your search keyword.
  17. Click on “Refresh” and you will see the Image list below it if everything is correct so far.

    Image 8

  18. Click on “Save changes” to save the settings.
  19. Click on Section page “Flick” to change the layout. The standard for image viewer layout is to have an Image grid layout. It is also a default layout for the Flickr Data Source.

    Image 9

  20. Select the suitable layout of your choice.
  21. Next is Binding. Bind whatever you want to show in your screen. In this demo, I’m using an Image grid layout so I need to bind only an image with Data.Image.
  22. For title, use whatever you want. It will be visible on the main screen.
  23. Here DATA represents an Image Object. You can see various Image properties in the binding list.
  24. Click “Save changes”.

    Image 10

  25. Now click on the detail page “Image” just below the Section page.

    Image 11

  26. Choose the layout and appropriate binding settings.

    Image 12

  27. To enable the user to pin a specific image to the start, click on “Extras”
  28. Disable “Text To Speech” since it is not required on this page.
  29. Enable Share Text if you want to allow sharing.
  30. Enable PinToStart to allow the user to pin that image in the Start.

    Image 13

  31. Click on “Save” to save the settings.
  32. Click on “Detail” that is next to “Image”.

    Image 14

  33. Choose the layout for the image detail and bind it with the appropriate Image attributes.
  34. This page can be viewed by a user by swiping the screen to the left.
  35. Click on “Save changes” to save the settings.

    Image 15

  36. Click on “Next”. On the next page, you can set the appearance of your app.
  37. For setting the appearance, you can check my article “windows-phone-app-studio-part-2”. That article mainly focuses on the Appearance settings of an app.
  38. After setting the appearance, you can generate your app.
  39. The generated app can be used in a Phone Device or it can be published in the Market Store as well.

Summary

In this article, we learned how to use a Flickr Data Source for creating Flickr photo view applications. You can also use the “User ID” option of this Data Source. Don’t forget to share and comment.

Output

Image 16

Filed under: CodeProject, Windows Phone
Image 17 Image 18

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Student
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
-- There are no messages in this forum --