Hierarchy
Object
- DependencyObject
- UIElement
- FrameworkElement
- Control
- ItemsControl
- TemplatedItemsControl
- Panorama
- Pivot
Pivot and Panorama :
- Controls
- Used in case you have to display info which is larger then the screen.
- Have a virtual space that is arranged horizontally and can be accessed by sweeping your fingers right or left across the screen
- Have Title property and TitleTemplate
- Defines SelectionChanged event and properties SelectedIndex , SelectedItem which relates to the item shown.
- A collection of PivotItem objects.
- Tapping on the next header navigate to it
Panorama
- A collection of PanoramaItem objects
PivotItem and PanoramaItem
- Have a content which is object , in particular other control.
- Have a Header property and HeaderTemplate
PivotItem
- Derived from ContentControl.
PanoramaItem
- Derived from ContentControl
Source sample
PivitandPanorama_NK.zip
Add a new page and choose "Windows Phone Panorama Page"
Basically what you get is the following
I have changed it to make it more interesting - all PanoramaItems are images
PanoramaPage.xaml
Note that all three XAML representation of Image element are equivalence.
Remember that PanoramaIten derives from ContentControl so you can dismiss the Content tag
Run the application and click "Panorama Control" button to produce :
Now drag the image to the right to produce
Source sample
PivitandPanorama_NK.zip
Add a new page and choose "Windows Phone Pivot Page"
Basically what you get is the following
I will change it as i did in the previous so you will notice the difference
PivotPage.xaml
Run the application and click "Pivot Control" button to produce :
Now drag the image to the right to produce
The feeling is very similar to the Panorama control. Panorama seems more smooth
Nathan
No comments:
Post a Comment