今天我遇到了ComboBox的奇怪行为。如果按下鼠标左键,ComboBox中的PointerPressed事件永远不会触发。只有单击鼠标右键才会触发。谁能告诉我为什么会这样?我想用鼠标左键来激活PointerPressed事件。
<Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
<ComboBox x:Name="MyComboBox" Width="200" Height="60" PointerPressed="ComboBox_PointerPressed_1">
<ComboBox.Items>
<TextBlock Text="test1"/>
<TextBlock Text="test2"/>
<TextBlock Text="test3"/>
</ComboBox.Items>
</ComboBox>
</Grid>
private void ComboBox_PointerPressed_1(object sender, PointerRoutedEventArgs e)
{
}