Click here to Skip to main content
13,042,819 members (76,707 online)
Rate this:
Please Sign up or sign in to vote.
This is probably one of the dumbest questions asked here but I'm really stuck so if someone could shed some light I'd be more than thankful.

So I've been trying to develop a simple Windows Phone app which would act as a cookbook. I'm new to Windows Phone and C# (and app development for that matter) so data binding has been a bit of a mess since there aren't too many Windows Phone tutorials out there and I have yet to find one which shows how data binding between different pages works.

So here's what I'm trying to do:
1. I have a list box withe recipes that I call, well, recipes Recipe("Cake")); Recipe("Bread")); Recipe("Mud Cake")); Recipe("Jam")); Recipe("Pie")); Recipe("Cookies")); Recipe("Panda"));

2. I also used the listBox's method to see when an item has been selected. If it get's selected it should navigate to the recipe's page with some basic details

private void recipes_SelectionChanged(object sender, SelectionChangedEventArgs e)
            //If nothing is selected
            if (recipes.SelectedIndex == -1) {
            /*Before navigating I should probably set the RecipeInfo.xaml to show the selected recipe's details - That's the problem */
            NavigationService.Navigate(new Uri("/RecipeInfo.xaml", UriKind.Relative));
            recipes.SelectedIndex = -1;

3. And here's the problem. I don't know how to bind the data so that the Recipe's name, description and ingredients would show on the RecipeInfo.xaml page.

(By the way if I didn't mention already, the Recipe has a name, description and ingredients, all three are strings)

One thing that really annoys me is that I know that the solution is probably ridiculously simple, I just don't know what it is. Any help whatosever would be really appriciated.
Posted 25-Jun-13 1:34am

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 25 Jun 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100