diff --git a/src/Avalonia.Base/Data/Converters/StringFormatValueConverter.cs b/src/Avalonia.Base/Data/Converters/StringFormatValueConverter.cs
index 3703929356..643f26a3c1 100644
--- a/src/Avalonia.Base/Data/Converters/StringFormatValueConverter.cs
+++ b/src/Avalonia.Base/Data/Converters/StringFormatValueConverter.cs
@@ -3,8 +3,18 @@ using System.Globalization;
namespace Avalonia.Data.Converters
{
+ ///
+ /// A value converter which calls
+ ///
public class StringFormatValueConverter : IValueConverter
{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The format string.
+ ///
+ /// An optional inner converter to be called before the format takes place.
+ ///
public StringFormatValueConverter(string format, IValueConverter inner)
{
Contract.Requires(format != null);
@@ -13,15 +23,24 @@ namespace Avalonia.Data.Converters
Inner = inner;
}
+ ///
+ /// Gets an inner value converter which will be called before the string format takes place.
+ ///
public IValueConverter Inner { get; }
+
+ ///
+ /// Gets the format string.
+ ///
public string Format { get; }
+ ///
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
value = Inner?.Convert(value, targetType, parameter, culture) ?? value;
return string.Format(Format, value, culture);
}
+ ///
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotSupportedException("Two way bindings are not supported with a string format");