This commit is contained in:
TheXamlGuy
2024-05-26 18:09:53 +01:00
parent 2bd7b54fa0
commit baf504b815
5 changed files with 12 additions and 97 deletions
+11 -1
View File
@@ -319,7 +319,7 @@ public partial class ObservableCollection<TItem> :
return Task.CompletedTask;
}
public Task Handle(SelectionEventArgs<TItem> args) =>
public Task Handle(SelectionEventArgs<TItem> args) =>
Task.CompletedTask;
public int IndexOf(TItem item) =>
@@ -342,6 +342,16 @@ public partial class ObservableCollection<TItem> :
return Task.CompletedTask;
}
public TItem Insert<T>(int index = 0,
params object?[] parameters)
where T :
TItem
{
T? item = Factory.Create<T>(parameters);
InsertItem(0, item);
return item;
}
public void Insert(int index, TItem item) =>
InsertItem(index, item);