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

Cursor = Hand in all coverflow items

2 Answers 23 Views
CoverFlow
This is a migrated thread and some comments may be shown as answers.
Cristian
Top achievements
Rank 1
Cristian asked on 25 Jan 2012, 05:49 PM
Hello,

I have a problem I canĀ“t solve: I would like to change cursor to "Hand" when user moves the mouse over any coverflow item. Presently, I only get cursor changes to hand when mouse is over the selected item. Also I can assign this cursor to the coverflow component, but it applies to all component, and I only want it for the items.

I have an item template:
<telerik:RadCoverFlow.ItemTemplate>
<DataTemplate >
<telerik:RadCoverFlowItem Cursor="Hand" >
<StackPanel x:Name="ItemStack" Width="37" Height="50" RenderTransformOrigin="0.5,0.5"
MouseLeftButtonDown="coverFlow_MouseLeftButtonDown" Cursor="Hand">
<StackPanel.Clip>
<RectangleGeometry Rect="0,0,37,50"></RectangleGeometry>
</StackPanel.Clip>                              
<StackPanel.RenderTransform>
<CompositeTransform/>
</StackPanel.RenderTransform >
<Border x:Name="itemBorder" Width="35" Height="35" BorderBrush="White" BorderThickness="0">
<StackPanel x:Name="stackPanelItemContent" Orientation="Vertical" >
<Grid Width="35" Height="35" Cursor="{Binding Cursor}">
<Image Source="/SLMapaRTMN;component/images/drop.png"></Image>
</Grid>
</StackPanel>
</Border>
<TextBlock x:Name="textBlockOrden" Margin="0,2,0,0" HorizontalAlignment="Center"
FontSize="12" FontFamily="Arial" Foreground="{Binding ColorFuente}" FontWeight="ExtraBold"
Text="{Binding Orden}">                                     
</TextBlock>
</StackPanel>
</telerik:RadCoverFlowItem>
</DataTemplate>
</telerik:RadCoverFlow.ItemTemplate>

And this is the item class:
public class CoverFlowItem
    {
        public InfoSolucion Info { get; set; }
        public int Orden { get; set; }
        public Cursor Cursor { get; set; }
        public Thickness BorderThickness { get; set; }
        public Color Color { get; set; }
        public Brush ColorFuente { get; set; }
    }

2 Answers, 1 is accepted

Sort by
0
Boyan
Telerik team
answered on 30 Jan 2012, 10:40 AM
Hello,

I can see that you are trying to change the Cursor in the ItemTemplate. Could you please try to do the same in the ItemContainerStyle instead of ItemTemplate. This should apply the behavior you want.

Don't hesitate to contact us if you are still having problems with the desired behavior.


Greetings,
Boyan
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Cristian
Top achievements
Rank 1
answered on 30 Jan 2012, 11:04 AM
Oh thanks!! I thought the ItemTemplate was applied to all items...and I forgot to use the ItemContainerStyle. I just add this:

<telerik:RadCoverFlow.ItemContainerStyle>
     <Style TargetType="telerik:RadCoverFlowItem">
               <Setter Property="Cursor" Value="Hand" />
     </Style>
</telerik:RadCoverFlow.ItemContainerStyle>
 and it works!

Thanks.
Tags
CoverFlow
Asked by
Cristian
Top achievements
Rank 1
Answers by
Boyan
Telerik team
Cristian
Top achievements
Rank 1
Share this question
or