Password complexity indicator works again in new databases (but solution is dirty...)

Copy button in text boxes fully works
This commit is contained in:
2017-11-07 11:45:02 +01:00
committed by BONNEVILLE Geoffroy
parent 8e690747e2
commit c3b8c97eea
8 changed files with 67 additions and 42 deletions

View File

@@ -0,0 +1,26 @@
using Windows.ApplicationModel.DataTransfer;
using Windows.UI.Xaml;
using Microsoft.Xaml.Interactivity;
namespace ModernKeePass.Actions
{
public class ClipboardAction : DependencyObject, IAction
{
public string Text
{
get { return (string)GetValue(TextProperty); }
set { SetValue(TextProperty, value); }
}
public static readonly DependencyProperty TextProperty =
DependencyProperty.Register("Text", typeof(string), typeof(ClipboardAction), new PropertyMetadata(string.Empty));
public object Execute(object sender, object parameter)
{
var dataPackage = new DataPackage { RequestedOperation = DataPackageOperation.Copy };
dataPackage.SetText(Text);
Clipboard.SetContent(dataPackage);
return null;
}
}
}