using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;

namespace VIZ.Package.Module.Resource
{
    /// <summary>
    /// 行号转化器
    /// </summary>
    public class RowHandleConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            DevExpress.Xpf.Data.RowHandle rowHandle = value as DevExpress.Xpf.Data.RowHandle;
            if (rowHandle == null)
                return null;

            return rowHandle.Value + 1;
        }

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