I'm trying to create a wp7 pivot control application. On click of a button in the first page, I would like to navigate to another page which is already a pivot page. Is it possible ?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
Sounds like you want the second piece of code. If your Pivot has 2 items, (say item1, item2), then to navigate to item2 from item1, you would use:
Check out this quick example that demonstrates it .
http://dl.dropbox.com/u/129101/WindowsPhonePivotApplication1.zip
That said, this isn't recommended if you're using it for a "Wizard" style application. See http://timheuer.com/blog/archive/2010/08/13/windows-phone-panorama-versus-pivot-ux-guidelines.aspx
Here is how you can navigate to another page, it does not matter if it is a pivot page or not:
If you are trying to navigate to another pivotitem then you will need to do the following
do it like this
SelectedIndex can be whatever depending how many pivot items you have
If you have for example following definition for the Pivot control:
Then you can go to for example OtherSettings using this code in the button click event handler:
index goes 0-1-2-3 ... write which one you want to navigate.
If you have dynamically create pivot items, you can use this easy code: