mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-25 06:04:59 +00:00

* use Converters.ListConverters.ToCount instead of adding two properties to get the count of list. * adding a new TextBlock to show number of files
15 lines
481 B
C#
15 lines
481 B
C#
using System.Collections;
|
|
|
|
using Avalonia.Data.Converters;
|
|
|
|
namespace SourceGit.Converters
|
|
{
|
|
public static class ListConverters
|
|
{
|
|
public static readonly FuncValueConverter<IList, string> ToCount =
|
|
new FuncValueConverter<IList, string>(v => v == null ? " (0)" : $" ({v.Count})");
|
|
|
|
public static readonly FuncValueConverter<IList, bool> IsNotNullOrEmpty =
|
|
new FuncValueConverter<IList, bool>(v => v != null && v.Count > 0);
|
|
}
|
|
}
|