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

@@ -15,6 +15,9 @@
using System;
using CommonServiceLocator;
using GalaSoft.MvvmLight.Ioc;
using Microsoft.Extensions.DependencyInjection;
using ModernKeePass.Domain.Interfaces;
using GalaSoft.MvvmLight;
namespace ModernKeePass.ViewModels
{
@@ -29,6 +32,18 @@ namespace ModernKeePass.ViewModels
/// </summary>
public ViewModelLocator()
{
if (ViewModelBase.IsInDesignModeStatic)
{
// Create design time view services and models
//SimpleIoc.Default.Register<IDataService, DesignDataService>();
}
else
{
// Create run time view services and models
//SimpleIoc.Default.Register<IDataService, DataService>();IDataService
SimpleIoc.Default.Register(() => App.Services.GetRequiredService<IDateTime>());
}
SimpleIoc.Default.Register<SettingsVm>();
SimpleIoc.Default.Register<MainVm>();
SimpleIoc.Default.Register<GroupDetailVm>();