Changed some observable collections types for HamburgerMenu binding (issue with WinRT 8.1)

Restored CollectionViewSource for recent (issue with WinRT 8.1)
Forbid horizontal scrolling in Main Menu
Fixed an incorrect SetupFocusAction target object binding
This commit is contained in:
2020-06-08 14:16:54 +02:00
parent 4a0bc1cb86
commit f477828628
7 changed files with 37 additions and 14 deletions

View File

@@ -38,7 +38,7 @@ namespace ModernKeePass.ViewModels
{
public ObservableCollection<EntryVm> Entries { get; private set; }
public ObservableCollection<GroupVm> Groups { get; private set; }
public ObservableCollection<IEntityVm> Groups { get; private set; }
public bool IsNotRoot => Database.RootGroupId != _group.Id;
@@ -144,7 +144,7 @@ namespace ModernKeePass.ViewModels
Entries = new ObservableCollection<EntryVm>(_group.Entries);
Entries.CollectionChanged += Entries_CollectionChanged;
Groups = new ObservableCollection<GroupVm>(_group.Groups);
Groups = new ObservableCollection<IEntityVm>(_group.Groups);
Groups.CollectionChanged += Groups_CollectionChanged;
}
@@ -255,7 +255,7 @@ namespace ModernKeePass.ViewModels
private async Task SortGroupsAsync()
{
await _mediator.Send(new SortGroupsCommand {Group = _group});
Groups = new ObservableCollection<GroupVm>(_group.Groups);
Groups = new ObservableCollection<IEntityVm>(_group.Groups);
RaisePropertyChanged(nameof(Groups));
SaveCommand.RaiseCanExecuteChanged();
}