Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1084335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:32:55+00:00 2026-05-16T22:32:55+00:00

I have a pretty simple setup that I cannot get to work in silverlight.

  • 0

I have a pretty simple setup that I cannot get to work in silverlight. I have an order with a collection of OrderPayments. These objects are part of a Entity Framework model and are exposed through WCF RIA Services. I can bind perfectly fine to any basic property on the Order class, but I wanted to bind to a listbox to show the OrderPayments. Here’s the XAML for the ListBox.

<ListBox ItemsSource="{Binding Data.OrderPayments, ElementName=orderDataSource}"></ListBox>

Nothing ever appears in the listbox and there is at least one OrderPayment for the order displayed. orderDataSource is a DomainDataSource that contains the Order. The odd thing about this is that I don’t receive any binding errors and when I bind to a TextBlock using the following code:

<TextBlock Text="{Binding Data.OrderPayments, ElementName=orderDataSource}" />

The text ‘OrderPayment’ is outputted to the screen. Is there something different I have to do to get Silverlight to actually pick up the reference to the object?

Entire XAML below:

<riaControls:DomainDataSource AutoLoad="True" Name="orderDataSource" QueryName="GetOrder">
        <riaControls:DomainDataSource.QueryParameters>
            <riaControls:Parameter ParameterName="orderid" Value="1" />
        </riaControls:DomainDataSource.QueryParameters>
        <riaControls:DomainDataSource.DomainContext>
            <ds:CEWCPSDomainContext />
        </riaControls:DomainDataSource.DomainContext>
    </riaControls:DomainDataSource>

    <StackPanel Orientation="Vertical" Margin="12">
        <StackPanel Orientation="Horizontal">
            <Button Width="100" Height="50" Content="Save &amp; Return" Margin="0,0,12,12" />
            <Button Width="100" Height="50" Content="Orders" Margin="0,0,12,12" />
            <Button Width="100" Height="50" Content="Emails" Margin="0,0,12,12" />
        </StackPanel>

        <StackPanel Orientation="Horizontal">
            <dataForm:DataForm x:Name="dataForm1" Header="Order Contact Information" 
                       AutoGenerateFields="False" AutoEdit="False" AutoCommit="False" 
                      CurrentItem="{Binding Data, ElementName=orderDataSource}">
                <dataForm:DataForm.EditTemplate>
            <DataTemplate>
                <StackPanel Orientation="Horizontal">
                    <StackPanel>
                        <dataForm:DataField Label="First Name">
                            <TextBox Text="{Binding FirstName, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnExceptions=True }" />
                        </dataForm:DataField>
                        <dataForm:DataField Label="Last Name">
                            <TextBox Text="{Binding LastName, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnExceptions=True }"/>
                        </dataForm:DataField>
                        <dataForm:DataField Label="Organization">
                            <TextBox Text="{Binding Organization, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnExceptions=True }"/>
                        </dataForm:DataField>
                        <dataForm:DataField Label="Phone">
                            <TextBox Text="{Binding Phone, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnExceptions=True }"/>
                        </dataForm:DataField>
                        <dataForm:DataField Label="Fax">
                            <TextBox Text="{Binding Fax, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnExceptions=True }"/>
                        </dataForm:DataField>
                        <dataForm:DataField Label="Email">
                            <TextBox Text="{Binding Email, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnExceptions=True }"/>
                        </dataForm:DataField>
                        <dataForm:DataField Label="Address 1">
                            <TextBox Text="{Binding Address1, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnExceptions=True }"/>
                        </dataForm:DataField>
                        <dataForm:DataField Label="Address 2">
                            <TextBox Text="{Binding Address2, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnExceptions=True }"/>
                        </dataForm:DataField>
                        <dataForm:DataField Label="City">
                            <TextBox Text="{Binding City, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnExceptions=True }"/>
                        </dataForm:DataField>
                        <dataForm:DataField Label="State">
                            <TextBox Text="{Binding State, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnExceptions=True }"/>
                        </dataForm:DataField>
                        <StackPanel Orientation="Horizontal" Width="Auto">
                            <dataForm:DataField Label="Zip code">
                                <TextBox Text="{Binding Zip, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnExceptions=True }"/>
                            </dataForm:DataField>
                            <dataForm:DataField>
                                <TextBox Text="{Binding Zip4, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnExceptions=True }"/>
                            </dataForm:DataField>
                        </StackPanel>
                        <dataForm:DataField Label="Country">
                            <TextBox Text="{Binding Country, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnExceptions=True }"/>
                        </dataForm:DataField>
                    </StackPanel>
                </StackPanel>
            </DataTemplate>
        </dataForm:DataForm.EditTemplate>
            </dataForm:DataForm>

            <StackPanel Orientation="Vertical">
                <TextBlock FontWeight="Bold" FontSize="16" Text="Order Total / Payments" />
                <TextBlock >
                    <Run Text="Order Total:" />
                    <Run Text="{Binding Data.OrderTotal, ElementName=orderDataSource}" />
                </TextBlock>
                <TextBlock Text="Payments" />
                <TextBlock Text="{Binding Data.OrderPaymentItems, ElementName=orderDataSource}" />
                <ListBox ItemsSource="{Binding Data.OrderPayments, ElementName=orderDataSource}">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding Amount}" />
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>

            </StackPanel>
        </StackPanel>
    </StackPanel>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T22:32:56+00:00Added an answer on May 16, 2026 at 10:32 pm

    WCF RIA Services does not include child entities by default. I needed to put [Include()] on the OrderPayments property of the Order object. Works like a charm now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a pretty simple ASP.NET Web Form that looks a bit like the
I have a pretty simple problem. Basically I have an array called $list that
This should be pretty simple, but I can't seem to get it. I have
I have a pretty simple setup: Apache server, PHP 5.3, Eclipse, PHP Zend Debug
I have what looks to me to be a pretty simple setup of model,
I have a pretty simple setup for this unit test. I have a class
I have a pretty simple set up for a messaging application. I simply get
I have pretty simple jquery code : $(document).ready(function(){ $('img.marqFl').on({ mouseenter: function() { $(this).animate({height: 300},
i have pretty simple simple question (i hope so). How do i change the
I have a pretty simple trigger: CREATE OR REPLACE FUNCTION f_log_datei() RETURNS TRIGGER AS

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.