Need basic help on CoverFlow

6 posts, 0 answers
  1. David Orr
    David Orr avatar
    4 posts
    Member since:
    Oct 2009

    Posted 24 Nov 2009 Link to this post

    I am new to Silverlight and Telerik.  I am trying to get a very basic cover flow control to display an image and have not been able to do so.  I am hoping I might get some help here.

    I started with a brand new Telerik VB Silverlight project in VS 2008.

    I have attached an image of my solution explorer window.  Below is the xaml in my page.
    <UserControl  x:Class="SilverlightTest.MainPage" 
                  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
                  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                  xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
                  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
                  xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" 
                  mc:Ignorable="d" 
                  d:DesignWidth="640" 
                  d:DesignHeight="480">  
        <Grid x:Name="LayoutRoot">  
            <telerikNavigation:RadCoverFlow x:Name="CoverFlow">  
                <Image Source="Images/50798567-0002.png" /> 
            </telerikNavigation:RadCoverFlow> 
                </Grid> 
    </UserControl> 

    The code behind is basically empty.

    When run, the control only displays a red circle with a white X.  I assume this means it couldn't load the image.

    I have tried having the path set to /Images/50798567-0002.png and I have also tried placing the Images directory in the Web project.  I obviously am missing something basic.

    If I can get this to work then I can move ahead with my learning process but for now I am stuck.  Any assistance would be greatly appreciated.

    TIA,

    David
  2. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 24 Nov 2009 Link to this post

    Hi David,

    The image should be with build action Content in order to use it this way.

    Regards,
    Miroslav Nedyalkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft banner
  4. David Orr
    David Orr avatar
    4 posts
    Member since:
    Oct 2009

    Posted 24 Nov 2009 Link to this post

    Miroslav,

    Thanks for replying.  I'm sorry for needing you to be so basic but I just don't have enough exposure to these things yet.

    Could you please explain what you mean by the image be with build action being Content. How is that set?

    Thanks,

    David
  5. David Orr
    David Orr avatar
    4 posts
    Member since:
    Oct 2009

    Posted 24 Nov 2009 Link to this post

    Hi Miroslav,

    Okay, my brain unfroze and I know what you mean.  The build action was set to Resource, I changed it to Content and that had no effect.  I also tried changing the Copy to Output Directory to Always copy but that also had no effect.

    So, I am still in the same boat.

    Any other suggestions?

    Do you know where there might be an example of a complete solution performing this basic functionality?

    David
  6. David Orr
    David Orr avatar
    4 posts
    Member since:
    Oct 2009

    Posted 24 Nov 2009 Link to this post

    I switched over to binding the images in code and I now can get the file to load, so I can continue on from here.

    I would like to ask one more question though.  What image types does the CoverFlow control support?  It does support .png but looks like it won't support .bmp or .tif.

    Thanks again.

    David
  7. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 25 Nov 2009 Link to this post

    Hello David,

    The CoverFlow displays any kind of visual elements including Silverlight images. What you do to display images in the CoverFlow control is to put a Image visual elements as items of the CoverFlow control and the support of the image formats depends on the Silverlight plugin. You could find some more information about silverlight here: http://silverlight.net/getstarted/ and you could find more information about the supported media types here: http://silverlight.net/getstarted/overview.aspx.

    About the paths and images, please refer to the attached example that shows some images in a CoverFlow control.

    Regards,
    Miroslav Nedyalkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top
DevCraft banner