As of now the FluidPivotPanel only handled user interactions and performed the animation based on them. Explicit selected through code has not been added yet.
However there is a quick solution for that.
If you look at the PivotHeaderControl class, it has an event called
HeaderSelected, which is fired when the user clicks on the HeaderControl. The Header moves in response to this event. You can extend this class further to add one more API (say
SelectHeader) which will raise the event.
public void SelectHeader()
if (HeaderSelected != null)
HeaderSelected(this, new EventArgs());
Now you can modify your own code like this
public void SelectPivotItemByName(string headerItem)
if (headerItem == null)
// Find the PivotItem whose header was selected
PivotItem pItem = pivotItems.Where(p => p.PivotHeader.Name.Equals(headerItem)).FirstOrDefault();
if ((pItem != null) && (pItem != currPivotItem))