Silverlight Windows Phone 7 中的 PivotControl 项更改行为 [英] PivotControl item changing behavior in Silverlight Windows Phone 7

查看:22
本文介绍了Silverlight Windows Phone 7 中的 PivotControl 项更改行为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,用户被发送到一个带有 PivotControl 的页面.SelectedIndex 在用户导航到页面之前是未知的.我正在设置 SelectedIndex,但它会导致 PivotControl 从索引 0 开始,然后翻到我设置的索引.

I have an app where the user is sent to a page with a PivotControl. The SelectedIndex is not known until the user navigates to the page. I'm setting the SelectedIndex, but it causes the PivotControl to start on index 0, then flip through to the index I set.

这有点烦人,我宁愿让它直接进入我设置的索引.有没有办法解决这个问题?

This is kind of annoying, and I'd rather just have it go directly to the index I set. Is there some way around this?

我想到的一个技巧是按顺序将数据提供给 pivotControl.ItemsSource,这样我希望用户开始的项目是 ItemsSource 中的索引 0.但这会有点混乱,我想知道是否有更优雅的解决方案.

One hack I thought up was providing the data to pivotControl.ItemsSource in an order such that the item I want the user to start on is index 0 in ItemsSource. But that would be kind of messy, and I'm wondering if there's a more elegant solution.

推荐答案

这是今天控件的一个已知问题,抱歉.您的解决方法(按偏好排序)可能是目前实现这一目标的最佳方式.下次来看看我们能不能做得更好!

This is a known issue with the control today, sorry. Your workaround, ordering per preference, is likely the best way to achieve this for now. We're going to see if we can do better next time here!

这篇关于Silverlight Windows Phone 7 中的 PivotControl 项更改行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆