Cursor = Hand in all coverflow items

3 posts, 0 answers
  1. Cristian
    Cristian avatar
    7 posts
    Member since:
    Jun 2011

    Posted 25 Jan 2012 Link to this post

    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. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 30 Jan 2012 Link to this post

    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 >>

  3. DevCraft banner
  4. Cristian
    Cristian avatar
    7 posts
    Member since:
    Jun 2011

    Posted 30 Jan 2012 Link to this post

    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.
Back to Top