步步为盈
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1017 B

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Windows.Data;
namespace BBWY.Client.Converters
{
public class MultiStateConverter : IMultiValueConverter
{
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
{
var param = parameter?.ToString();
var parms = param.Split(":");
if (values == null||values.Count()<2) return null;
string taskState = values[0]?.ToString();
string exceptState = values[1]?.ToString();
if (taskState != param)
{
return taskState ;
}
else
{
return exceptState;
}
}
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}