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

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

1 Answer 54 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Tayyaba
Top achievements
Rank 1
Tayyaba asked on 09 May 2017, 04:23 AM

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.

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 11 May 2017, 04:18 PM
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.
Tags
ToolBar
Asked by
Tayyaba
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or