Updated Silverlight FlickR demo for Beta2

I had a little time while traveling to South Africa so I thought I'd update my Silverlight FlickR demo to Beta2. 



Download the full solution read the full writeup


(note: in the application, you can click on the image to advance to the next one)


Overall, the changes were pretty minor, the most  interesting one was a change in the way Isolated Storage is accessed.  

I set up a page level variable called appsettings:

IsolatedStorageSettings appSettings = IsolatedStorageSettings.ApplicationSettings;


Then, when the page is loaded, I initialized based on it.

public Page() {
    if (appSettings.Contains("searchTerm"))
        this.searchTermTextBox.Text = (string)appSettings["searchTerm"];
    if (appSettings.Contains("imageNumber"))
        ImageNumber = (int)appSettings["imageNumber"];

Then, at the right time in the application flow, I save data to it


private void searchResultsImage_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
     if (Photos == null) return;
     if (ImageNumber >= Photos.Count()) ImageNumber = 0;

     FlickRPhoto p = Photos.Skip(ImageNumber).First();
     this.searchResultsImage.Source = new BitmapImage(new Uri (p.ImageUrl));

     appSettings["imageNumber"] = ImageNumber;



Notice, I also use Corrina's updated "Flat" style for SL beta2 as well, while the style structure changed a lot to take advantage of the new Visual State Manager, the changes to my code were minimal. 

Comments (5)

  1. Karen Corby on VSM part 2, Jesse Liberty on upcoming Webcasts, a Coffee-break Webcast with Martha Rotter

  2. Lamin Barrow says:

    I have not gone around to creating anything in silverlight  beta 2 but i will think of something.  

    One more thing.. How come south Africa is the only country in Africa that get’s attention when it comes to technology? They even get to host Tech Ed. I think that’s very not fair. I live in The Gambia and  I speak .Net and most of it’s related technologies too including the new ASP.NET MVC framework but i am probably the only one who

    could down here and compared to south Africa… well. May be thats why they get everything.

  3. The last part of webcast series didn’t focus specifically on one facet of Silverlight 2, but rather highlighted

  4. cnblogs.com says:

    ASPX: 1.任何在Visual Studio平台上开发(人员)必不可少的工具。 http://msdn.microsoft.com/en-us/magazine/cc300778.aspx 2.一个新版本

Skip to main content