Subversion Repository Public Repository

Nextrek

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Data;

namespace NotizieTL
{
    public class AlternateRowColour : IValueConverter
    {
        bool isAlternate;
        SolidColorBrush even = new SolidColorBrush(Colors.Transparent); // Set these two brushes to your alternating background colours.
        SolidColorBrush odd = new SolidColorBrush(Color.FromArgb(255, 241, 241, 241));

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            isAlternate = !isAlternate;
            return isAlternate ? even : odd;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}

Commits for Nextrek/WindowsPhone/NotizieTL/NotizieTL/AlternateRowColour.cs

Diff revisions: vs.
Revision Author Commited Message
37 LTardio picture LTardio Thu 18 Jul, 2013 20:17:52 +0000