private void Item_LayoutRoot_Loaded(object sender, RoutedEventArgs e)
{
StackPanel ItemRef = sender as StackPanel; // get the reference to the control
SolidColorBrush brush1 = new SolidColorBrush(Color.FromArgb(0,0,0,0)); //base colour
SolidColorBrush brush2 = new SolidColorBrush(Color.FromArgb(255,255,0,0)); //alternate colour
if (_useAlternate)
ItemRef.Background = brush1;
else
ItemRef.Background = brush2;
_useAlternate = !_useAlternate;
}