mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-20 02:55:38 +08:00
@@ -12,6 +12,7 @@
|
||||
// </copyright>
|
||||
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
@@ -66,6 +67,19 @@ namespace MaaWpfGui.Styles.Properties
|
||||
scrollViewer.ScrollChanged -= ScrollChanged;
|
||||
}
|
||||
}
|
||||
else if (d is ListBox listBox)
|
||||
{
|
||||
INotifyCollectionChanged view = listBox.Items;
|
||||
view.CollectionChanged += (sender, arg) =>
|
||||
{
|
||||
switch (arg.Action)
|
||||
{
|
||||
case NotifyCollectionChangedAction.Add:
|
||||
listBox.ScrollIntoView(listBox.Items[arg.NewStartingIndex]);
|
||||
break;
|
||||
}
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new InvalidOperationException("The attached AlwaysScrollToEnd property can only be applied to ScrollViewer instances.");
|
||||
|
||||
@@ -201,6 +201,7 @@
|
||||
dd:DragDrop.IsDragSource="{Binding Idle}"
|
||||
dd:DragDrop.IsDropTarget="{Binding Idle}"
|
||||
hc:BorderElement.CornerRadius="4,4,0,0"
|
||||
properties:AutoScroll.AutoScroll="True"
|
||||
BorderThickness="1,1,1,0"
|
||||
DragDrop.Drop="{s:Action CopilotItemIndexChanged}"
|
||||
IsEnabled="{c:Binding StartEnabled}"
|
||||
|
||||
Reference in New Issue
Block a user