using System; using System.Globalization; using System.Windows.Controls; using System.Windows.Data; namespace HMI.UI.Converter { public class DataGridRowFlagConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if (value is DataGridRow row) { return row.GetIndex() % 2 == 1; } return null; } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { return value; } } }