PivotControl item changing behavior in Silverlight Windows Phone 7

℡╲_俬逩灬. 提交于 2020-01-03 02:32:27

问题


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?

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.


回答1:


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!



来源:https://stackoverflow.com/questions/4541020/pivotcontrol-item-changing-behavior-in-silverlight-windows-phone-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!