Refactor in file open mechanisms: file is passed to user control

Confirmation dialogs on group and entry delete
This commit is contained in:
2017-10-11 14:30:07 +02:00
committed by BONNEVILLE Geoffroy
parent 454e074c44
commit 97b1475100
12 changed files with 124 additions and 62 deletions

View File

@@ -0,0 +1,23 @@
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Microsoft.Xaml.Interactivity;
namespace ModernKeePass.Actions
{
public class SetupFocusAction : DependencyObject, IAction
{
public Control TargetObject
{
get { return (Control)GetValue(TargetObjectProperty); }
set { SetValue(TargetObjectProperty, value); }
}
public static readonly DependencyProperty TargetObjectProperty =
DependencyProperty.Register("TargetObject", typeof(Control), typeof(SetupFocusAction), new PropertyMetadata(0));
public object Execute(object sender, object parameter)
{
return TargetObject?.Focus(FocusState.Programmatic);
}
}
}