From 63a628731e533d5aa41c367b9cfae19c4db83944 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Thu, 21 Jun 2018 18:56:37 +0200 Subject: [PATCH] Added XML docs for StringFormatValueConverter. --- .../Converters/StringFormatValueConverter.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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");