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

Items not showing properly

4 Answers 91 Views
Carousel
This is a migrated thread and some comments may be shown as answers.
Oliver
Top achievements
Rank 1
Oliver asked on 18 Sep 2012, 08:05 PM

Hi,

I'm using Telerik V2012.1.325.35 and I have a strange behaviour with my RadCarousel component.
 
In our application we have a RadGridView and beside de RadGridView we have a RadTabControl with 2 TabItems, in the first TabItem I have a RichTextBox and in the second RadTabItem I have a RadCarousel. When I click on one Item in my GridView, I load 2 images on disk, for both image, I create and object of type "InterDependencyImage" (definition at the end) and I added to my carousel using the following piece of code:

    var img = pPdf as InterDependencyImage;
    img.Image = new Image();
    img.Image.Source = img.Frame;    
    theCarousel.Items.Add(img);

When the loading images process ended, I click on my RadTabItem containing my RadCarousel and I can see my 2 images. The first one is perfectly visible but the 2nd one is blank!!! If I scroll the blank image outside the RadCarousel and I scroll it back into the view portion of the RadCarousel, I can see it perfectly now!!!

I'm I missing something???

Thank's

    public class InterDependencyImage
    {
        #region Contructors.
        public InterDependencyImage()
        {
            No = 1;
            TotalImages = 1;
            Notes = "";
            Type = "";
            PrimaryImageGUID = Guid.Empty;           
        }
        #endregion

        #region Public properties.
        public int No { get; set; }
        public int TotalImages { get; set; }
        public Image Image { get; set; }
        public BitmapFrame Frame { get; set; }
        public string Notes { get; set; }
        public string Type { get; set; }
        public Guid PrimaryImageGUID { get; set; }
        #endregion
    }

4 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 19 Sep 2012, 06:29 AM
Hi,

May I ask you to test with our latest version - 2012.2.912.35 and let me know if you still experience such problems. What is the result if you do not use a TabControl but place the RadCarousel outside it. It is not clear if the TabControl is connected to the GridView, or it is separately defined - would you please clarify?

Kind regards,
Didie
the Telerik team

Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

0
Oliver
Top achievements
Rank 1
answered on 19 Sep 2012, 12:49 PM
Hi Didie,

In my Window, I have a RadGridView in the upper part and in the lower part I have my RadTabControl. The RadTabControl is not connected to the grid. When data is visible in the RadGridView, the user can click on a row, from that, I start a thread to get the row detail from the server (data and images), when images arrived, I insert it in the RadCarousel, one by one. The problem occur only when I have more than one image.

Thank's
0
Dimitrina
Telerik team
answered on 21 Sep 2012, 03:38 PM
Hello,

This is indeed strange behaviour. Would you please isolate the issue in a demo project and send it to us?

Regards,
Didie
the Telerik team

Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

0
Oliver
Top achievements
Rank 1
answered on 15 Oct 2012, 02:47 PM
Hi Didie,

I found the problem but I need precision :)

The problem come from the fact that we use a third party library to convert a PDF document into a stream and then, after, we use the class "TiffBitmapDecoder" to convert the stream into an array of BitmapFrame and then we pass the array to the caroussel. For a PDF document with 1 page, was had no problem at all but when we had PDF documents with more than one pages, all pages greather than 1 appear blank into the carousel.

The following piece of code in bold was the issue:
TiffBitmapDecoder tiffDecoder = new TiffBitmapDecoder(tiffStream, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default);
imgs = tiffDecoder.Frames;

Then I replaced the piece of code by the one in bold to solve my problem:
TiffBitmapDecoder tiffDecoder = new TiffBitmapDecoder(tiffStream, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.OnLoad);
imgs = tiffDecoder.Frames; 

The difference between the changes are related to caching issue, can you provide me informations why those changes are necessary and if it's normal? I would like to know if those changes cannot broke something else in my application.

Thank's
Tags
Carousel
Asked by
Oliver
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Oliver
Top achievements
Rank 1
Share this question
or