ComboBox在Windows 8中的PointerPressed事件不起作用

时间:2013-01-08 11:47:56

标签: c# .net event-handling

今天我遇到了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)
{

}

0 个答案:

没有答案