瀏覽代碼

Add SelectAll and UnselectAll to ListBox.

Steven Kirk 6 年之前
父節點
當前提交
ac59468ddc
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10 0
      src/Avalonia.Controls/ListBox.cs

+ 10 - 0
src/Avalonia.Controls/ListBox.cs

@@ -84,6 +84,16 @@ namespace Avalonia.Controls
             set { SetValue(VirtualizationModeProperty, value); }
             set { SetValue(VirtualizationModeProperty, value); }
         }
         }
 
 
+        /// <summary>
+        /// Selects all items in the <see cref="ListBox"/>.
+        /// </summary>
+        public new void SelectAll() => base.SelectAll();
+
+        /// <summary>
+        /// Deselects all items in the <see cref="ListBox"/>.
+        /// </summary>
+        public new void UnselectAll() => base.UnselectAll();
+
         /// <inheritdoc/>
         /// <inheritdoc/>
         protected override IItemContainerGenerator CreateItemContainerGenerator()
         protected override IItemContainerGenerator CreateItemContainerGenerator()
         {
         {