2013-04-27 30 views
1

嘿家伙,所以我有我的Windows Phone 8应用程序中的页面,每当我到达该页面,如果我点击任何ListBox项目太快,它不会检测到水龙头,所以我必须重新点击它会检测到触摸一次或两次,有时甚至返回时会在后退按钮(电话上)上点击多次。这是xaml。Windows Phone 8 - 我必须双击才能加载列表框项目以检测点按。

<!--ContentPanel - place additional content here--> 
    <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> 
     <ListBox x:Name="LocationsList" ItemsSource="{Binding Venues}" toolkit:TurnstileFeatherEffect.FeatheringIndex="2" SelectionChanged="LocationsList_SelectionChanged" > 
      <ListBox.ItemTemplate> 
       <DataTemplate> 
        <StackPanel Margin="0,0,0,17" Width="432"> 
         <TextBlock Text="{Binding Name}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}"/> 
         <TextBlock Text="{Binding Address}" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextAccentStyle}"/> 
        </StackPanel> 
       </DataTemplate> 
      </ListBox.ItemTemplate> 
     </ListBox> 
    </Grid> 
    </Grid> 

回答

0

尝试使用Tap属性和LongListSelector。

xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" 

<phone:LongListSelector Tap="OnSeleted"> 

不知道的背部按键。在覆盖函数中放置一个断点,以确保每次按后退键时调用该断点:

protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgs e) 
{ 
    base.OnBackKeyPress(e); 
} 
相关问题