mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 23:50:18 -04:00
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:
21
ModernKeePass/Controls/TextBoxWithButton.cs
Normal file
21
ModernKeePass/Controls/TextBoxWithButton.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user