Mouse hover on toolbar's Grip area doesn't change mouse cursor. Mouse cursor should be changed to SizeAll cursor type

2 posts, 0 answers
  1. Tayyaba
    Tayyaba avatar
    12 posts
    Member since:
    Apr 2017

    Posted 08 May Link to this post

    Referencing to the sample projects of RadToolBar provided here:
    https://github.com/telerik/xaml-sdk/tree/master/ToolBar

     

    There's no option to set the mouse cursor to SizeAll when mouse is over the grip visual area.

  2. Martin Ivanov
    Admin
    Martin Ivanov avatar
    1404 posts

    Posted 11 May Link to this post

    Hello Tayyaba,

    To change the cursor of the grip area you can extract the ControlTemplate of the RadToolBar control and change the Cursor of the grip visual element. This the Grid that holds the elements with x:Names "GripOrnamentH" and "GripOranmentV".

    Here is an example in code:
    <Grid Background="Transparent" Visibility="{TemplateBinding GripVisibility}" Cursor="SizeAll">
        <Grid x:Name="GripOrnamentH" HorizontalAlignment="Center" Margin="5,0,2,0" Visibility="Visible" VerticalAlignment="Center">
            <Path Data="M0,12L2,12 2,14 0,14 0,12z M0,8L2,8 2,10 0,10 0,8z M0,4L2,4 2,6 0,6 0,4z M0,0L2,0 2,2 0,2 0,0z" Fill="White" HorizontalAlignment="Left" Height="14" Margin="1,1,0,0" VerticalAlignment="Top" Width="2"/>
            <Path Data="M0,12L2,12 2,14 0,14 0,12z M0,8L2,8 2,10 0,10 0,8z M0,4L2,4 2,6 0,6 0,4z M0,0L2,0 2,2 0,2 0,0z" Fill="#FF373B43" HorizontalAlignment="Left" Height="14" VerticalAlignment="Top" Width="2"/>
        </Grid>
        <Grid x:Name="GripOrnamentV" HorizontalAlignment="Center" Margin="0,5,0,2" Visibility="Collapsed" VerticalAlignment="Center">
            <Path Data="M12,0L12,2 14,2 14,0 12,0z M8,0L8,2 10,2 10,0 8,0z M4,0L4,2 6,2 6,0 4,0z M0,0L0,2 2,2 2,0 0,0z" Fill="White" HorizontalAlignment="Left" Height="2" VerticalAlignment="Top" Width="14"/>
            <Path Data="M12,0L12,2 14,2 14,0 12,0z M8,0L8,2 10,2 10,0 8,0z M4,0L4,2 6,2 6,0 4,0z M0,0L0,2 2,2 2,0 0,0z" Fill="#FF373B43" HorizontalAlignment="Left" Height="2" Margin="1,1,0,0" VerticalAlignment="Top" Width="14"/>
        </Grid>
    </Grid>

    Regards,
    Martin
    Telerik by Progress
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top