Databind image source with RIA Services

2 posts, 0 answers
  1. Rick Mueller
    Rick Mueller avatar
    103 posts
    Member since:
    Feb 2010

    Posted 14 Jan 2011 Link to this post

    I have a Coverflow control binded to basic Northwind category table with 8 images.
    I have btyes[] text appear instead of image, I pass the binding thru a converter and the IE crashes on debugging
    Please any thoughts?
           <local:ImageConverter x:Key="ImgCon"/>
    <telerik:RadCoverFlow DisplayMemberPath="Picture" ItemsSource="{Binding ElementName=categoryDomainDataSource, Path=Data}" >
                                               <Image Source="{Binding Picture, Converter={StaticResource ImgCon}}"  telerik:RadCoverFlow.EnableLoadNotification="True" />
      my Ria Service Source
    <riaControls:DomainDataSource AutoLoad="True" d:DesignData="{d:DesignInstance my1:Category, CreateList=true}" Height="0" LoadedData="categoryDomainDataSource_LoadedData" Name="categoryDomainDataSource" QueryName="GetCategoriesQuery" >
                    <my1:RecipeContext />
    public class ImageConverter : IValueConverter
            public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
                BitmapImage bmi = new BitmapImage();
                if (value != null)
                    byte[] byteBlob = value as byte[];
                    MemoryStream ms = new MemoryStream(byteBlob);
                return bmi;
            public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
                throw new NotImplementedException();
  2. Kaloyan
    Kaloyan avatar
    920 posts

    Posted 19 Jan 2011 Link to this post

    Hi Rick,

    Can you attach all of the visual studio exceptions and try loading the example again. Hope that the error will appear this time with some more meaningful description as we are not able to determine the problem with the code you have send us.

    All the best,
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Back to Top