123456789101112131415161718192021222324252627282930313233343536 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Windows.Data;
- using System.Windows.Media;
- using Xceed.Wpf.DataGrid;
- using System.Data;
- using System.Windows;
- namespace Aitex.UI.RecipeEditor
- {
- public class CellForeColorConverter : IMultiValueConverter
- {
- public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- var cell = values[0] as DataCell;
- if (cell == null) return Brushes.Black;
-
- RecipeEditorControlViewModel controlViewModel = values[1] as RecipeEditorControlViewModel;
- if (controlViewModel == null) return Brushes.Black;
- if (!(cell.DataContext is DataRowView)) return Brushes.Black;
- var dataRowView = cell.DataContext as DataRowView;
- System.Data.DataRow row = dataRowView.Row;
- int currentRowIndex = row.Table.Rows.IndexOf(row);
- return Brushes.Black;
- }
- public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
- {
- return null;
- }
- }
- }
|