34 lines
916 B
C#
34 lines
916 B
C#
using GeekDesk.Constant;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Globalization;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Data;
|
|
|
|
namespace GeekDesk.Converts
|
|
{
|
|
class StringAppendConvert : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
if (value == null) return null;
|
|
if (parameter == null)
|
|
{
|
|
return value.ToString();
|
|
} else
|
|
{
|
|
string val = value.ToString();
|
|
string param = parameter.ToString();
|
|
return param.Replace("{}", val);
|
|
}
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|