Reputation: 2875
I have a Path created by Syncfusion Metro Studio and put this inside a Grid. For this Grid I have set a Hand cursor and an Interaction Trigger for the click Event.
<Grid Grid.Column="2"
Cursor="Hand"
Margin="0,0,7,0">
<Path Data="M34.201,35.752792L36.154999,37.072937 36.154999,61.028999 26.27,61.028999 26.27,58.465 34.201,58.465z M18.94405,30.222998C17.962244,30.222998 17.167,31.018967 17.167,32.00045 17.167,32.982033 17.962244,33.778 18.94405,33.778 19.925556,33.778 20.721001,32.982033 20.721001,32.00045 20.721001,31.018967 19.925556,30.222998 18.94405,30.222998z M44.257435,25.653L44.257435,29.183289 51.842999,29.183289 51.842999,35.705292 44.257435,35.705292 44.257435,39.237999 34.201,32.444984z M26.27,3.8619995L36.154999,3.8619995 36.154999,27.81745 34.201,29.137484 34.201,6.2989998 26.27,6.2989998z M24.27,0L24.27,64 0,60 0,4.0000029z"
Stretch="Uniform"
Fill="#FFFFFFFF"
Width="26"
Height="26"
Margin="0,0,0,0"
RenderTransformOrigin="0.5,0.5">
<Path.RenderTransform>
<TransformGroup>
<TransformGroup.Children>
<RotateTransform Angle="0" />
<ScaleTransform ScaleX="1" ScaleY="1" />
</TransformGroup.Children>
</TransformGroup>
</Path.RenderTransform>
</Path>
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseLeftButtonUp">
<cmd:EventToCommand Command="{Binding Path=Close}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</Grid>
The cursor only changes to a Hand, wgen I mouseover the Path and not the spaces between it. I want the whole Path (including spaces between) to be clickable.
I hope anyone has a solution for me ;)
Upvotes: 0
Views: 425
Reputation: 50672
Only something that has been drawn can be clicked, so you have to draw the gaps.
Fortunately you can draw the gaps with a transparent color e.g., #00FFFFFF
You could simply add a rectangle or ellipse to the same grid cell and stack the Path on top of that.
Upvotes: 2