SivaSu
SivaSu

Reputation: 77

Adding PivotItem dynamically to a pivot at particular position in Windows phone 8.1

I am able to generate PivotItems dynamically and create controls in pivotitem and associate with Pivot as: CalPivot.Items.Add(new PivotItem() { Header = "Position 1" });

It adds PivotItem to the last of the Pivot. But as per my requirement, i may need to add PivotItem to the beginning of the pivot (as the first element).

Could you please help me to understand how to add PivotItem at the beginning of the Pivot.

Upvotes: 0

Views: 949

Answers (1)

Umesh Kamble
Umesh Kamble

Reputation: 81

You can try this also

CalPivot.Items.Insert(0, new PivotItem() { Header = "Position 1" });

Upvotes: 1

Related Questions