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

  • Home
  • SEARCH
  • 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 1096369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:16:30+00:00 2026-05-17T00:16:30+00:00

Ok, So I have tried to implement a coverflow found on codeplex http://silverlightcoverflow.codeplex.com/ I

  • 0

Ok, So I have tried to implement a coverflow found on codeplex http://silverlightcoverflow.codeplex.com/

I wanted to use my own class for data binding:

    class CoverItem
    {
        BitmapImage _image;
        string _title;
        string _link;
        string _content;

        public BitmapImage Image
        {
            get { return _image; }
            set { _image = value; }
        }

        public string Title
        {
            get { return _title; }
            set { _title = value; }
        }

        public string Link
        {
            get { return _link; }
            set { _link = value; }
        }

        public string Content
        {
            get { return _content; }
            set { _content = value; }
        }
    }

This is the XAML for the Cover User Control from codeplex:

<custom:CoverFlowControl.ItemTemplate>
    <DataTemplate>
        <StackPanel>
            <Image Source="{Binding Image}" Width="300" />
            <TextBlock Text="{Binding Title}" Width="300" />
            <TextBlock Text="Testing" Width="300" />
        </StackPanel>
    </DataTemplate>
</custom:CoverFlowControl.ItemTemplate>

The problem I am having is that I get word “Testing” for each element that was bound, but I am not getting image or the title, which are from my objects that attached to the ItemSource property of the control.

Covers.ItemsSource = _items;

My question is, where am I going wrong? This should be a simple binding, so think I am missing something.

Thanks in advance for the help.

EDIT:

If I change the code to this:

List<BitmapImage> images = new List<BitmapImage>() { _items[0].Image, _items[1].Image, _items[2].Image, _items[3].Image };

Covers.ItemsSource = images;// _items;

And then have the binding as this:

<Image Source="{Binding}" Width="300" />

I now get my images displaying. So I know it is a problem with the binding somewhere.

Have also tried

<Image Source="{Binding Path=Image}" Width="300" />
  • 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-17T00:16:30+00:00Added an answer on May 17, 2026 at 12:16 am

    Make the CoverItem class public. One of the downsides of Silverlight is reflection permission on internal Types across assemblies is not allowed. When binding to CLR properties, reflection is used to get the value. The assembly that’s trying to get the value is System.Windows, and it won’t have permission to reflect an internal Type in your assembly.

    I’ve written about this in context of anonymous Types (which are internal Types):
    http://surrealization.com/blog/silverlight-anonymous-type-binding-gotcha/

    Alternately you can provide an InternalsVisibleTo attribute on your assembly to allow System.Windows to “see” your internal Type.
    http://grahammurray.wordpress.com/2010/05/30/binding-to-anonymous-types-in-silverlight/

    For from-the-horse’s-mouth description, see this MSDN link:
    http://msdn.microsoft.com/en-us/library/stfy7tfc(VS.95).aspx

    In Silverlight, you cannot use
    reflection to access private types and
    members. If the access level of a type
    or member would prevent you from
    accessing it in statically compiled
    code, you cannot access it dynamically
    by using reflection.

    And
    http://connect.microsoft.com/VisualStudio/feedback/details/526229/in-silverlight-4-binding-to-an-internal-data-by-code-doesnt-work

    Silverlight supports binding to public
    types only.

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

Sidebar

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.