Вам потребуется создать преобразователь значений:
[ValueConversion(typeof(string), typeof(string))]
public class ReplaceCarriageReturnConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return value as string == null ? string.Empty : (value as string).Replace("\r", " - "); ;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
}
Объявите ваш преобразователь:
<local:ReplaceCarriageReturnConverter x:Key="ReplaceCarriageReturnConverter"/>
Измените привязку:
<GridViewColumn Width="365" Header="Desc" DisplayMemberBinding="{Binding desc, Converter={StaticResource ReplaceCarriageReturnConverter}}" />