mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 23:50:18 -04:00
Refactor in file open mechanisms: file is passed to user control
Confirmation dialogs on group and entry delete
This commit is contained in:
23
ModernKeePass/Actions/SetupFocusAction.cs
Normal file
23
ModernKeePass/Actions/SetupFocusAction.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user