mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-04 16:10:16 -04:00
23 lines
735 B
C#
23 lines
735 B
C#
|
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);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|