Created TextBox with Forward button style for Entry Url

Created PasswordBox with always visible Forward button for Open Database user control
This commit is contained in:
2017-10-12 17:30:29 +02:00
committed by BONNEVILLE Geoffroy
parent 69a63f4b2e
commit cddda7adcd
12 changed files with 657 additions and 70 deletions

View File

@@ -0,0 +1,21 @@
using System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
namespace ModernKeePass.Controls
{
public class TextBoxWithButton : TextBox
{
public event EventHandler<RoutedEventArgs> GotoClick;
protected override void OnApplyTemplate()
{
base.OnApplyTemplate();
var extraButton = GetTemplateChild("GotoButton") as Button;
if (extraButton != null)
{
extraButton.Click += (sender, e) => GotoClick?.Invoke(sender, e);
}
}
}
}