lacas
lacas

Reputation: 14077

Windows Phone 7 Add PivotItem to Pivot with code in real time, how?

How can I add Pivot Items in runtime, and add some content to it?

Upvotes: 0

Views: 1158

Answers (1)

Tom Verhoeff
Tom Verhoeff

Reputation: 1270

You can create PivotItems at runtime just like you would create any UIelement. For example like this:

PivotItem pitem = new PivotItem(); //create pivotitem                
pitem.Content =  //set pivotitem content
MyPivot.Items.Add(pitem);//Add pivotitem to your pivot

Upvotes: 3

Related Questions