我有一个由 Syncfusion Metro Studio 创建的路径,并将其放入网格中。对于这个网格,我为点击事件设置了一个手形光标和一个交互触发器。
<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>
光标仅变为手形,wgen 我将鼠标悬停在路径上,而不是路径之间的空格。我希望整个路径(包括之间的空格)都是可点击的。
我希望任何人都可以为我提供解决方案;)