Browse Source
Merge branch 'master' into wip-animations
pull/1461/head
Jumar Macato
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
0 deletions
-
src/Avalonia.Controls/ItemsControl.cs
|
|
|
@ -364,6 +364,7 @@ namespace Avalonia.Controls |
|
|
|
|
|
|
|
var collection = sender as ICollection; |
|
|
|
PseudoClasses.Set(":empty", collection == null || collection.Count == 0); |
|
|
|
PseudoClasses.Set(":singleitem", collection != null && collection.Count == 1); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -421,6 +422,7 @@ namespace Avalonia.Controls |
|
|
|
private void SubscribeToItems(IEnumerable items) |
|
|
|
{ |
|
|
|
PseudoClasses.Set(":empty", items == null || items.Count() == 0); |
|
|
|
PseudoClasses.Set(":singleitem", items != null && items.Count() == 1); |
|
|
|
|
|
|
|
var incc = items as INotifyCollectionChanged; |
|
|
|
|
|
|
|
|