feat: stop changing selection after checking canselect. revert focus change in this case.
This commit is contained in:
@@ -6,19 +6,19 @@ namespace Ursa.Controls;
|
||||
public class SelectionChangingEventArgs: RoutedEventArgs
|
||||
{
|
||||
/// <summary>Gets the items that were added to the selection.</summary>
|
||||
public IList AddedItems { get; }
|
||||
public IList NewItems { get; }
|
||||
|
||||
/// <summary>Gets the items that were removed from the selection.</summary>
|
||||
public IList RemovedItems { get; }
|
||||
public IList OldItems { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the selection can be changed. If set to <c>false</c>, the selection will not change.
|
||||
/// </summary>
|
||||
public bool CanSelect { get; set; } = true;
|
||||
|
||||
public SelectionChangingEventArgs(RoutedEvent routedEvent, IList removedItems, IList addedItems): base(routedEvent)
|
||||
public SelectionChangingEventArgs(RoutedEvent routedEvent, IList oldItems, IList newItems): base(routedEvent)
|
||||
{
|
||||
RemovedItems = removedItems;
|
||||
AddedItems = addedItems;
|
||||
OldItems = oldItems;
|
||||
NewItems = newItems;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user