Tag: flipview

WindowPhone FlipView System.ArgumentException

我在WindowsPhone应用程序中使用FlipView时遇到问题。 我有一个带有FlipView的页面,它有ItemsSource绑定到ItemsGroup和SelectedItem绑定到CurrentItem。 FlipView的DataTemplate包含附加了属性Html的WebView,该属性Html绑定到CurrentItem的Html。 一切顺利,但应用程序不时与System.ArgumentException崩溃,我不知道什么是错的。 XAML: C#: public class NewsItem { public string Title { get; set; } public string Link { get; set; } public DateTime Published { get; set; } public string Html { get; set; } public string Image { get; set; } } 错误: 参数不正确。 System.ArgumentException:值不在预期范围内。

在FlipView_SelectionChanged事件中设置ListView的SelectedIndex

我正在使用FlipView构建一个Photo应用程序。 在BottomAppBar中,当我在ListView单击它时,我放置了所有图像的ListView ,以便能够在FlipView查看图像,并获得在ListView选择的FlipView显示的图像(如分页)。 在listView.selectionChanged事件中,当我在ListView选择它时,我创建了在FlipView中显示图像的代码。 这是代码: private void listView_SelectionChanged(object sender, SelectionChangedEventArgs e) { string CurrentViewState = ApplicationView.GetForCurrentView().Orientation.ToString(); int IndicatorIndex = listView.SelectedIndex; GoToPage(CurrentViewState, IndicatorIndex); } private void GoToPage(string CurrentViewState, int IndicatorIndex) { if (CurrentViewState == “Portrait”) { flipView1.SelectedIndex = IndicatorIndex; } else if (CurrentViewState == “Landscape”) { if (IndicatorIndex % 2 == 0) flipView1.SelectedIndex = IndicatorIndex / […]