using Avalonia.Data.Converters; namespace SourceGit.Converters { public static class DoubleConverters { public static readonly FuncValueConverter Increase = new FuncValueConverter(v => v + 1.0); public static readonly FuncValueConverter Decrease = new FuncValueConverter(v => v - 1.0); public static readonly FuncValueConverter ToPercentage = new FuncValueConverter(v => (v * 100).ToString("F3") + "%"); public static readonly FuncValueConverter OneMinusToPercentage = new FuncValueConverter(v => ((1.0 - v) * 100).ToString("F3") + "%"); } }