mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00

Going back to home when opening a file from explorer no longer displays open file Inverted Breadcrumb order to avoid reordering items Update release notes Code cleanup
37 lines
1.3 KiB
C#
37 lines
1.3 KiB
C#
using System.Linq;
|
|
using Windows.UI.Xaml;
|
|
using ModernKeePass.Application.Group.Models;
|
|
using ModernKeePass.ViewModels;
|
|
|
|
// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236
|
|
|
|
namespace ModernKeePass.Views.UserControls
|
|
{
|
|
public sealed partial class BreadcrumbUserControl
|
|
{
|
|
public GroupVm Group
|
|
{
|
|
get { return (GroupVm)GetValue(GroupProperty); }
|
|
set { SetValue(GroupProperty, value); }
|
|
}
|
|
public static readonly DependencyProperty GroupProperty =
|
|
DependencyProperty.Register(
|
|
nameof(Group),
|
|
typeof(GroupVm),
|
|
typeof(BreadcrumbUserControl),
|
|
new PropertyMetadata(null, async (o, args) =>
|
|
{
|
|
var userControl = o as BreadcrumbUserControl;
|
|
var vm = userControl?.StackPanel.DataContext as BreadcrumbControlVm;
|
|
if (vm == null) return;
|
|
await vm.Initialize(args.NewValue as GroupVm).ConfigureAwait(false);
|
|
userControl?.ListView.ScrollIntoView(vm.BreadcrumbItems.Last());
|
|
}));
|
|
|
|
public BreadcrumbUserControl()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
}
|
|
}
|