This is a migrated thread and some comments may be shown as answers.

Need basic help on CoverFlow

5 Answers 69 Views
CoverFlow
This is a migrated thread and some comments may be shown as answers.
David Orr
Top achievements
Rank 1
David Orr asked on 24 Nov 2009, 03:23 PM
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

5 Answers, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 24 Nov 2009, 04:16 PM
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.
0
David Orr
Top achievements
Rank 1
answered on 24 Nov 2009, 09:02 PM
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
0
David Orr
Top achievements
Rank 1
answered on 24 Nov 2009, 09:16 PM
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
0
David Orr
Top achievements
Rank 1
answered on 24 Nov 2009, 09:28 PM
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
0
Miroslav Nedyalkov
Telerik team
answered on 25 Nov 2009, 01:20 PM
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.
Tags
CoverFlow
Asked by
David Orr
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
David Orr
Top achievements
Rank 1
Share this question
or