添加项目文件。
This commit is contained in:
22
MSDevTool/Converters/NullToStringConverter.cs
Normal file
22
MSDevTool/Converters/NullToStringConverter.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
|
||||
|
||||
namespace MSDevTool.Converters
|
||||
{
|
||||
//用于Null值
|
||||
public class NullToStringConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return value ?? "<null>";
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user