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

@@ -7,6 +7,7 @@ using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Input;
using ModernKeePass.Application.Common.Interfaces;
using ModernKeePass.Controls;
using System.Collections.ObjectModel;
// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236
@@ -62,18 +63,18 @@ namespace ModernKeePass.Views.UserControls
typeof(HamburgerMenuUserControl),
new PropertyMetadata(Visibility.Collapsed, (o, args) => { }));
public IEnumerable<IEntityVm> ItemsSource
public ObservableCollection<IEntityVm> ItemsSource
{
get { return (IEnumerable<IEntityVm>)GetValue(ItemsSourceProperty); }
get { return (ObservableCollection<IEntityVm>)GetValue(ItemsSourceProperty); }
set { SetValue(ItemsSourceProperty, value); }
}
public static readonly DependencyProperty ItemsSourceProperty =
DependencyProperty.Register(
nameof(ItemsSource),
typeof(IEnumerable<IEntityVm>),
typeof(ObservableCollection<IEntityVm>),
typeof(HamburgerMenuUserControl),
new PropertyMetadata(new List<IEntityVm>(), (o, args) => { }));
new PropertyMetadata(new ObservableCollection<IEntityVm>(), (o, args) => { }));
public object SelectedItem
{