1
所有人。儘管我相信其他人也遇到過這個問題,但我找不到解決問題的辦法。基本上,在包裝面板中有20個按鈕,它位於滾動查看器內。問題是,當我想要滾動列表時,click事件觸發觸發器。真的很感激這個幫助。滾動查看器內的按鈕問題
<ScrollViewer>
<ScrollViewer.Content>
<toolkit:WrapPanel Orientation="Horizontal"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Width="420">
<Button Style="{StaticResource imageButtonStyle}" >
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<cmd2:EventToCommand Command="{Binding SelectCommand, Mode=OneWay}"
CommandParameterValue="1" />
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
<Button Style="{StaticResource imageButtonStyle}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<cmd2:EventToCommand Command="{Binding SelectCommand, Mode=OneWay}"
CommandParameterValue="2" />
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
<Button Style="{StaticResource imageButtonStyle}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseEnter">
<cmd2:EventToCommand Command="{Binding SelectCommand, Mode=OneWay}"
CommandParameterValue="3" />
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
<Button Style="{StaticResource imageButtonStyle}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseEnter">
<cmd2:EventToCommand Command="{Binding SelectCommand, Mode=OneWay}"
CommandParameterValue="4" />
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
</toolkit:WrapPanel>
</ScrollViewer.Content>
是'Click`事件觸發區分?或者`MouseEnter`事件?我覺得點擊發生在釋放觸摸後,而不是觸摸本身。 MouseEnter甚至在手機上表示什麼? – 2011-01-12 23:16:30