Wrox Programmer Forums
BOOK: Beginning Windows Phone 7 Application Development: Building Windows Phone Applications Using S
This is the forum to discuss the Wrox book Beginning Windows Phone 7 Application Development: Building Windows Phone Applications Using Silverlight and XNA by Nick Lecrenski, Karli Watson, Robert Fonseca-Ensor; ISBN: 978-0-470-91233-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Windows Phone 7 Application Development: Building Windows Phone Applications Using S section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old June 20th, 2012, 01:29 PM
bmw bmw is offline
Registered User
Join Date: Feb 2012
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default No data is shown after Binding

I followed the book to set up the data binding in Blend in Chapter 12. However, the data didn't shown in the textbook. Would you point me what I missed. Thansk in advance.

The following is my MaingPage.xaml.

	mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
	SupportedOrientations="Portrait" Orientation="Portrait"

		<StaticResource ResourceKey="PhoneFontFamilyNormal"/>
		<StaticResource ResourceKey="PhoneFontSizeNormal"/>
		<StaticResource ResourceKey="PhoneForegroundBrush"/>

	<Grid x:Name="LayoutRoot" Background="Transparent" d:DataContext="{d:DesignData /SampleData/OrderSampleData.xaml}">
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="*"/>

		<!--TitlePanel contains the name of the application and page title-->
		<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
			<TextBlock x:Name="ApplicationTitle" Text="MY APPLICATION" Style="{StaticResource PhoneTextNormalStyle}"/>
			<TextBlock x:Name="PageTitle" Text="page name" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>

		<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
			<TextBox Height="48" Margin="68,71,204,0" TextWrapping="Wrap" Text="ox" VerticalAlignment="Top"
				x:Name="txtBinding" DataContext="{Binding Address, Mode=TwoWay}" Foreground="#FF6EE275" Background="#BFE48888"/>
There are my code behind on MainPage.xaml:
namespace test
    public partial class MainPage : PhoneApplicationPage
        public MainPage()
			 DataContext = new Order()
                Address = "My house",
                Total = 500,
                Products = new ObservableCollection<Product>
					new Product
						Description="something something something", 

Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Binding - Editing GridView Row Data desk_star BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 7 December 30th, 2007 11:07 AM
Printing data shown on form MKri General .NET 0 September 1st, 2006 07:15 AM
Data Binding Quick209 Classic ASP Databases 0 July 18th, 2005 03:23 PM
Data Binding Prashant.k.m Visual Studio 2005 0 April 21st, 2005 06:54 AM
Binding to Filtered Data (or Data subsets) gdbjohnson C# 8 August 27th, 2004 01:59 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.