Over a million developers have joined DZone.

Windows Phone 7: Pivot Page Indicator Control

· Mobile Zone

Visually compose APIs with easy-to-use tooling. Learn how IBM API Connect provides near-universal access to data and services both on-premises and in the cloud, brought to you in partnership with IBM.

One of the first applications I did with Windows Phone 7, utilized the pivot control. I imagine that type of control to be very popular in future development as it works perfectly with a lot of different application themes.

While I won't get into any misgivings or opinions on the use of the control, I will say that I wanted to provide a better experience for my application and wanted to provide the user with some sense of how many pages were in the particular series of "pivots" and exactly what page in that series they were on.

It is a simple concept really, we see these types of UI like experiences in other popular phone and web applications including Apple and Android. So with that said I created a control that is fully skinnable that mirrors those typical devices and works great with the pivot control.

So if you were looking for a solution to make your paging look like that of an apple or android paging indicator, look no further.You can simply enter the following xaml with the dll reference as follows or check out the sample to see a full sample use case:

<cl:PivotPageIndicator PageCount="{Binding Path=Items.Count,ElementName=PivotControlName}"SelectedIndex="{Binding Path=SelectedIndex,ElementName=PivotControlName}" />

Below is the source, so feel free to use at your liesure. I provided 2 things:

The DLL Only: PivotPageIndicatorDLL.zip 4Kb

The VS Source Project (with Sample): PivotSample.zip 98Kb

And please let me know if you enjoyed this solution and found it useful.

The Mobile Zone is brought to you in partnership with Strongloop and IBM.  Visually compose APIs with easy-to-use tooling. Learn how IBM API Connect provides near-universal access to data and services both on-premises and in the cloud.


Published at DZone with permission of Corey Miller, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}