问题
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