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

RadCarouselPanel PathStops

3 Answers 80 Views
Carousel
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 25 Sep 2008, 03:24 PM
Following your examples, I am trying to set PathStops.  No matter what I do to the PathFraction and Values, I still get the default behavior (center item is biggest, items fade out to the left and right).  I tried setting IsScalingEnabled="True" IsOpacityEnabled="True" on my RadCarouselPanel, but it has no effect.  I also tried setting TopItemPathFraction in the Properties window and I get an unhandled exception "Object reference not set to an instance of an object.".  I also found OverridesDefaultStyle, but that doesn't do anything for me.  Can you help?  

Also, do you have a list of all the properties and what they mean?

<ListBox x:Name="lstThumbsCarousel" Grid.Row="2"   ItemContainerStyle="{DynamicResource ThumbNailContainerStyle}" MouseRightButtonUp="ShowContextMenu" SelectionChanged="lstThumbsCarousel_SelectionChanged" Loaded="lstThumbsCarousel_Loaded"
            <ListBox.ItemsPanel> 
                <ItemsPanelTemplate> 
                    <telerik:RadCarouselPanel x:Name="radCarouselPanel"
                         <telerik:RadCarouselPanel.ScaleStops> 
                            <telerik:PathStopCollection> 
                                <telerik:PathStop PathFraction="0.0" Value="0.1" /> 
                                <telerik:PathStop PathFraction="0.47" Value="0.2" /> 
                                <telerik:PathStop PathFraction="0.5" Value="0.4" /> 
                                <telerik:PathStop PathFraction="0.53" Value="0.8" /> 
                                <telerik:PathStop PathFraction="1.0" Value="1.0" /> 
                            </telerik:PathStopCollection> 
                        </telerik:RadCarouselPanel.ScaleStops>   
                    </telerik:RadCarouselPanel> 
                </ItemsPanelTemplate> 
            </ListBox.ItemsPanel> 
        </ListBox> 
 

3 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 26 Sep 2008, 03:36 PM
Hello Scott,

We have identified the problem and we are currently working on a solution. In the mean time you could try to subscribe to the Loaded event of your window and problematically set the scale stops.

PathStopCollection scale = new PathStopCollection();  
 
scale.Add(new PathStop(0.0, 0.1));  
scale.Add(new PathStop(0.47, 0.2));  
scale.Add(new PathStop(0.5, 0.4));  
scale.Add(new PathStop(0.53, 0.8));  
scale.Add(new PathStop(1.0, 1.0));  
 
radCarouselPanel.ScaleStops = scale; 

We will notify you as soon as we have a working solution.

We also updated your Telerik points as per our EAP Program.

Regards,
Milan
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Scott
Top achievements
Rank 1
answered on 26 Sep 2008, 07:18 PM
Thank you.

What is the trick the get the top most item to appear where you want?  I have a serpentine-type path and I have played around with PathStops and ItemsPerPage but I still can't get my top most to be where I want.

What I want is for the top most item to be the largest in scale.    To get my largest scaled item to appear at the 2/3 point, I have set a PathStop Fraction at .66 and a Value of 3.  This works great.  Now how can I get it to also be the top most one?

            PathStopCollection scale = new PathStopCollection(); 
 
             scale.Add(new PathStop(0.0, .1)); 
             scale.Add(new PathStop(0.66, 3)); 
             scale.Add(new PathStop(1.0, .1)); 
 
 
            RadCarouselPanel panel = this.GetCarouselPanel(); 
 
            if (panel != null) 
            { 
                panel.ScaleStops = scale
            } 

0
Milan
Telerik team
answered on 30 Sep 2008, 01:31 PM
Hi Scott,

RadCarouselPanel has a property called TopItemPathFraction that determines the location of the topmost item.
In order to have the item at 0.66 to be the topmost one you should set TopItemPathFraction to 0.66.

We now have a solution for the problem that you have been experiencing when trying to set ScaleStops in XAML. Could you please one a support ticket so we can send you a custom build that resolves the problem?

Sincerely yours,

Milan
the Telerik team


Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Carousel
Asked by
Scott
Top achievements
Rank 1
Answers by
Milan
Telerik team
Scott
Top achievements
Rank 1
Share this question
or