private void pivotStops_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
int selectedIndex = (sender as Pivot).SelectedIndex;
if (e.AddedItems.Count > 0)
{
PivotItem currentItem = e.AddedItems[0] as PivotItem;
if (currentItem != null)
{
(currentItem.Header as TextBlock).Foreground = App.pivotHeaderColors[0];
}
}
if (e.RemovedItems.Count > 0)
{
PivotItem currentItem = e.RemovedItems[0] as PivotItem;
if (currentItem != null)
{
(currentItem.Header as TextBlock).Foreground = App.pivotHeaderColors[1];
}
}
}