如何利用flipview并通过点击或点击屏幕进行"选择"?

irp*_*rez 3 user-interface xaml windows-8 winrt-xaml

在Win 8中,flipview控件是浏览集合的绝佳控件.但是通过点击或鼠标点击进行"选择"的最佳方式是什么或者什么?我总是可以在翻转视图外面放一个按钮,但这不是平板电脑的每个人都期望的触摸体验.

有人可以提供一些示例代码(XAML/C#),如何设置一个flipview控件,选择某种导航到一个完全不同的页面?

Jen*_*SFT 5

如果我正确理解了这个问题,我写了一些有用的示例代码.我可以刷过FlipView并点击单个项目:

<FlipView Tapped="FlipView_Tapped_1">
    <Image Source="Images/Apple.jpg" />
    <Image Source="Images/Orange.jpg" />
    <Image Source="Images/Banana.jpg" />
</FlipView>
Run Code Online (Sandbox Code Playgroud)

然后

private YourTypeHere SelectedItem;
private void FlipView_Tapped_1(object sender, TappedRoutedEventArgs e)
{
    this.SelectedItem = (sender as FlipView).SelectedItem;
}
Run Code Online (Sandbox Code Playgroud)

你可能不想设置一个字段,但你明白了.希望您在视图模型中设置一些东西.从那里你可以离开或任何你需要的东西.FlipView继承自ItemsControl,就像其他每个XAML转发器一样.所以你可以完全相同.http://msdn.microsoft.com/en-us/library/system.windows.controls.itemscontrol.aspx