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

Images Cut out

3 Answers 45 Views
CoverFlow
This is a migrated thread and some comments may be shown as answers.
JJ Loubser
Top achievements
Rank 1
JJ Loubser asked on 14 Jul 2011, 03:06 PM
My style is the same as in the demo:  http://demos.telerik.com/silverlight/#CoverFlow/DataBindin

images are cut out from buttom see picture:
my code:

 <telerik:RadCoverFlow
                                                                                                        x:Name="CoverFlowAccommodationPhotos"
                                                                                                        DataContext="{Binding VenueAccommodationPhoto}"
                                                                                                        Loaded="CoverFlowAccommodationPhotos_Loaded"
                                                                                                        OffsetY="100"
                                                                                                        VerticalAlignment="Center"
                                                                                                        CameraViewpoint="Center"
                                                                                                        ItemScale="0.7"
                                                                                                        RotationY="60"
                                                                                                        ReflectionHeight="0.2"
                                                                                                        ReflectionOpacity="2"
                                                                                                        DistanceBetweenItems="35"
                                                                                                        DistanceFromSelectedItem="-30"
                                                                                                        ItemContainerStyle="{StaticResource   RadCoverFlowItemContainerStyle}"
                                                                                                        FlowDirection="LeftToRight"
                                                                                                        IsReflectionEnabled="False"
                                                                                                        MinWidth="746" MaxWidth="746"
                                                                                                        MouseWheel="CoverFlowAccommodationPhotos_MouseWheel"
                                                                                                        MouseMove="CoverFlowAccommodationPhotos_MouseMove"
                                                                                                            >
I have to make the Height about 800 to see the hole pictures, but the open space on top is to big, what am I missing?

3 Answers, 1 is accepted

Sort by
0
JJ Loubser
Top achievements
Rank 1
answered on 14 Jul 2011, 03:09 PM
Sorry code behind that load the images from the BO Server object:

public void loadCoverFlowAccommodationPhotos(RadCoverFlow RadCoverFlow_)
        {
            Business.Supplier.VenueAccommodationPhotoECL Images_ = (Business.Supplier.VenueAccommodationPhotoECL)RadCoverFlow_.DataContext;
                RadCoverFlow_.Items.Clear();

                if (Images_ != null && Images_.Count > 0)
                {

                    foreach (Business.Supplier.VenueAccommodationPhotoEC Image_ in Images_)
                    {
                        string newFileName = Image_.AccommodationPhotoName;

                        if (newFileName.Length > 0)
                        {
                            Uri urL = new Uri(this.RadUploadLayout.UploadServiceUrl, UriKind.RelativeOrAbsolute);

                            System.Uri sourceOriginalWay = new Uri(HtmlPage.Document.DocumentUri, urL.ToString());
                            string server = sourceOriginalWay.ToString();
                            server = server.Replace("RadUploadHandler.ashx", "");

                            string imageURL = server.ToString() +
                                 "" + RadUploadLayout.TargetFolder + "/" + newFileName;

                            Image img = new Image();
                            BitmapImage bmp = new BitmapImage(new Uri(imageURL, UriKind.RelativeOrAbsolute));
                            img.ImageFailed += this.NewImage_ImageFailed;
                            img.Source = bmp;
                            img.Margin = new Thickness(0);
                            img.Stretch = System.Windows.Media.Stretch.Uniform;
                            img.Name = "AccommodationPhoto" + Image_.OfferingVenueAccommodationPhotoID.ToString();
                            img.Tag = Image_.OfferingVenueAccommodationPhotoID;
                            img.MinHeight = 345;
                            img.MaxHeight = 345;
                            img.MinWidth = 345;
                            img.MaxWidth = 345;
                            img.DataContext = Image_;

                            RadCoverFlow_.Items.Add(img);

                        }

                    }

                }
        }


0
Accepted
Dani
Telerik team
answered on 18 Jul 2011, 09:27 AM
Hi,

Please, try removing the OffsetY property that is currently set to 100px.


All the best,
Dani
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
JJ Loubser
Top achievements
Rank 1
answered on 19 Jul 2011, 03:43 PM
worked thanks
Tags
CoverFlow
Asked by
JJ Loubser
Top achievements
Rank 1
Answers by
JJ Loubser
Top achievements
Rank 1
Dani
Telerik team
Share this question
or