Eugeniy Tunikov
Top achievements
Rank 1
Eugeniy Tunikov
asked on 09 Mar 2010, 03:20 PM
Hei. I have a directory on server which has images which amount varies.
I need to load the images and show them.
Right now my coverflow does not load images dynamicly. Here is the code
I need to load the images and show them.
Right now my coverflow does not load images dynamicly. Here is the code
<telerikNavigation:RadCoverFlow x:Name="CoverFlow" OffsetY="100" ItemsSource="{Binding}" VerticalAlignment="Center" ItemScale="0.85" > |
<telerikNavigation:RadCoverFlow.ItemTemplate> |
<DataTemplate> |
<local:AlbumCover Width="225" Height="225" /> |
</DataTemplate> |
</telerikNavigation:RadCoverFlow.ItemTemplate> </telerikNavigation:RadCoverFlow> |
<ScrollBar telerik:StyleManager.Theme="Office_Black" Width="600" Height="20" Margin="0,2,0,0" Orientation="Horizontal" SmallChange="1" LargeChange="3" Minimum="0" Grid.Row="1" Value="{Binding ElementName=CoverFlow, Path=SelectedIndex, Mode=TwoWay}" |
Maximum="{Binding ElementName=CoverFlow, Path=ItemsSource.Count, Converter={StaticResource IntToIntValueConverter}, ConverterParameter=-1}" /> </Grid> |
In the code behind it loads images like this
new DataItem () |
{ |
ImageSource = new Uri("Images/03.png", UriKind.Relative), Genre = "Jazz", Title = "The Most Relaxing Jazz Standards in the Universe", }, |
Like i said the images must be loaded dymamicly. First i need to read what files are in folder and then push them to silverlight app.
Please give me advise.
Thanks
9 Answers, 1 is accepted
0
Eugeniy Tunikov
Top achievements
Rank 1
answered on 10 Mar 2010, 08:52 AM
Do i need to create a generic handler?
0
Eugeniy Tunikov
Top achievements
Rank 1
answered on 11 Mar 2010, 09:10 AM
Can i do like this?
Uri uri = new Uri(@"http://localhost:6519/getfile.ashx", UriKind.Absolute); |
BitmapImage bi = new BitmapImage(uri); |
ObservableCollection<BitmapImage> bitmaps = new ObservableCollection<BitmapImage>(); |
bitmaps.Add(bi); |
this.coverFlow.ItemsSource = bitmaps; |
0
Eugeniy Tunikov
Top achievements
Rank 1
answered on 11 Mar 2010, 10:07 AM
Ok i have done this and pictures are showing
Uri uri = new Uri(@"http://localhost:6519/getfile.ashx", UriKind.Absolute); |
BitmapImage bi = new BitmapImage(uri); |
ObservableCollection<BitmapImage> bitmaps = new ObservableCollection<BitmapImage>(); |
bitmaps.Add(bi); |
bitmaps.Add(bi); |
bitmaps.Add(bi); |
bitmaps.Add(bi); |
bitmaps.Add(bi); |
bitmaps.Add(bi); |
bitmaps.Add(bi); |
bitmaps.Add(bi); |
this.coverFlow.ItemsSource = bitmaps; |
BUT!! now i cannot navigate pictures to the right and left. Its just static. Any idea why?
0
Hello Eugeniy Tunikov,
Do you use an ItemTemplate property to define the child template of your CoverFlow? Try setting in xaml the following template which should resolve your problem:
If you still have any issues, please do not hesitate to contact us again.
Greetings,
Hristo Borisov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Do you use an ItemTemplate property to define the child template of your CoverFlow? Try setting in xaml the following template which should resolve your problem:
<
navigation:RadCoverFlow.ItemTemplate
>
<
DataTemplate
>
<
Grid
Width
=
"128"
Height
=
"128"
>
<
Image
Source
=
"{Binding}"
/>
</
Grid
>
</
DataTemplate
>
</
navigation:RadCoverFlow.ItemTemplate
>
If you still have any issues, please do not hesitate to contact us again.
Greetings,
Hristo Borisov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
pallavi
Top achievements
Rank 1
answered on 14 Mar 2011, 07:07 AM
Hi Hristo Borisov,
I do have a same problem in loading images on CoverFlow from Server location.
i followed the below steps, but in my case i can just see the image loading cursor for e long time
but i cant see the image.
Dont know what could be the error.
can you please insist me on this.
Regards,
Pallavi
I do have a same problem in loading images on CoverFlow from Server location.
i followed the below steps, but in my case i can just see the image loading cursor for e long time
but i cant see the image.
Dont know what could be the error.
can you please insist me on this.
Regards,
Pallavi
0
Stephen Rouse
Top achievements
Rank 1
answered on 26 Apr 2011, 04:10 PM
Any answer to this? I have a similar issue! The imaging loading cursor just continues on and on and on....without showing the images.
0
Hello,
The problems could be caused by one of the folloing scenarios:
1. The path to the image is incorrect
2. The image is on a different location/domain and there is no correct cross domain policy file on the server
3. The image is on the Internet (and there is a correct cross domain policy file), but the application is started without a web application (directly using the Silverlight project)
You could debug this problem using a web debugging tool like fiddler.
If none of these helps, please prepare us a sample project and send it via support ticket. This could help us better investigate what the problem is and help you resolve it.
Kind regards,
Miroslav Nedyalkov
the Telerik team
The problems could be caused by one of the folloing scenarios:
1. The path to the image is incorrect
2. The image is on a different location/domain and there is no correct cross domain policy file on the server
3. The image is on the Internet (and there is a correct cross domain policy file), but the application is started without a web application (directly using the Silverlight project)
You could debug this problem using a web debugging tool like fiddler.
If none of these helps, please prepare us a sample project and send it via support ticket. This could help us better investigate what the problem is and help you resolve it.
Kind regards,
Miroslav Nedyalkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Stephen Rouse
Top achievements
Rank 1
answered on 14 May 2011, 11:12 AM
I had policy files etc, added a converter to use the full (Absolute) URL and this solved the issue, I tried switching of the Anti-Virus and firewalls on the client side, this seemed to resolve the issue for a while, but the issue returned when I was downloading in excess of 15 images. Using Absolute address works everytime, regardless of the number of images.
0
Hello Stephen,
Miroslav Nedyalkov
the Telerik team
It\s good to here that you found a solution of this problem.
Regards,Miroslav Nedyalkov
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items