diff --git a/butterflow-ui/BoolVisibilityConverter.cs b/butterflow-ui/BoolVisibilityConverter.cs index 506f229..035962a 100644 --- a/butterflow-ui/BoolVisibilityConverter.cs +++ b/butterflow-ui/BoolVisibilityConverter.cs @@ -9,9 +9,21 @@ using System.Windows.Data; namespace butterflow_ui { + /// A visibility converter. [ValueConversion(typeof(bool), typeof(Visibility))] public class BoolVisibilityConverter : IValueConverter { + /// Converts a value. + /// Thrown when an object cannot be cast to a required + /// type. + /// The value produced by the binding source. + /// The type of the binding target property. + /// The converter parameter to use. + /// The culture to use in the converter. + /// + /// A converted value. If the method returns , the valid null value is + /// used. + /// public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if (targetType == typeof(Visibility)) @@ -22,6 +34,17 @@ namespace butterflow_ui throw new InvalidCastException(string.Format("Cannot convert type to {0} from bool.", targetType.Name)); } + /// Converts a value. + /// Thrown when an object cannot be cast to a required + /// type. + /// The value that is produced by the binding target. + /// The type to convert to. + /// The converter parameter to use. + /// The culture to use in the converter. + /// + /// A converted value. If the method returns , the valid null value is + /// used. + /// public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { if (targetType == typeof(Visibility)) diff --git a/butterflow-ui/InverseBoolVisibilityConverter.cs b/butterflow-ui/InverseBoolVisibilityConverter.cs index 50b9131..a1cf12d 100644 --- a/butterflow-ui/InverseBoolVisibilityConverter.cs +++ b/butterflow-ui/InverseBoolVisibilityConverter.cs @@ -9,9 +9,21 @@ using System.Windows.Data; namespace butterflow_ui { + /// An inverse bool visibility converter. [ValueConversion(typeof(bool), typeof(Visibility))] public class InverseBoolVisibilityConverter : IValueConverter { + /// Converts a value. + /// Thrown when an object cannot be cast to a required + /// type. + /// The value produced by the binding source. + /// The type of the binding target property. + /// The converter parameter to use. + /// The culture to use in the converter. + /// + /// A converted value. If the method returns , the valid null value is + /// used. + /// public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if (targetType == typeof(Visibility)) @@ -22,6 +34,17 @@ namespace butterflow_ui throw new InvalidCastException(string.Format("Cannot convert type to {0} from bool.", targetType.Name)); } + /// Converts a value. + /// Thrown when an object cannot be cast to a required + /// type. + /// The value that is produced by the binding target. + /// The type to convert to. + /// The converter parameter to use. + /// The culture to use in the converter. + /// + /// A converted value. If the method returns , the valid null value is + /// used. + /// public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { if (targetType == typeof(Visibility))