Windows Phone 7 Add PivotItem to Pivot with code in real time, how?
How can I add Pivot Items in runtim开发者_Go百科e, and add some content to it?
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
精彩评论