using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Data; namespace xxxxxx { public class IndexConverter : IValueConverter { #region IValueConverter Members public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { int intValue; if (value != null) { bool isInt = int.TryParse(value.ToString(), out intValue); if (isInt) { if (intValue == -1) { return null; } } } return (int)value + 1; } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { return null; } #endregion } } ____________________________________________________________________ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Data; namespace xxxxxx { public class ValueConverter : IValueConverter { #region IValueConverter Members public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { return value; } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { return value; } #endregion } }