mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
code_review: review PR #68
* use Converters.ListConverters.ToCount instead of adding two properties to get the count of list. * adding a new TextBlock to show number of files
This commit is contained in:
parent
0e2da217f1
commit
ede96c298e
3 changed files with 17 additions and 53 deletions
|
@ -7,7 +7,7 @@ namespace SourceGit.Converters
|
|||
public static class ListConverters
|
||||
{
|
||||
public static readonly FuncValueConverter<IList, string> ToCount =
|
||||
new FuncValueConverter<IList, string>(v => $" ({v.Count})");
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue