mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-04 08:00:16 -04:00
Lots of code refactoring to use XAML behaviors instead of code-behind
New Save button in the AppBar EntryPage now uses the same AppBar as GroupPage (but not shared...) Some new Symbol mappings
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using Windows.UI.Xaml;
|
||||
using System.Threading.Tasks;
|
||||
using Windows.UI.Core;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Microsoft.Xaml.Interactivity;
|
||||
|
||||
@@ -13,11 +15,13 @@ namespace ModernKeePass.Actions
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty TargetObjectProperty =
|
||||
DependencyProperty.Register("TargetObject", typeof(Control), typeof(SetupFocusAction), new PropertyMetadata(0));
|
||||
DependencyProperty.Register("TargetObject", typeof(Control), typeof(SetupFocusAction), new PropertyMetadata(null));
|
||||
|
||||
public object Execute(object sender, object parameter)
|
||||
{
|
||||
return TargetObject?.Focus(FocusState.Programmatic);
|
||||
return Task.Factory.StartNew(
|
||||
() => Dispatcher.RunAsync(CoreDispatcherPriority.Low,
|
||||
() => TargetObject?.Focus(FocusState.Programmatic)));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user