mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 23:50:18 -04:00
Changed test project framework from Nunit to MSTest Changed HashAlgorithm from BouncyCastle to WinRT crypto WIP progress bar in opendatabaseusercontrol TextBox with button made generic WIP implement copy on button click in Entry Page
44 lines
1.5 KiB
C#
44 lines
1.5 KiB
C#
using System;
|
|
using Windows.UI.Xaml;
|
|
using Windows.UI.Xaml.Controls;
|
|
|
|
namespace ModernKeePass.Controls
|
|
{
|
|
public class TextBoxWithButton : TextBox
|
|
{
|
|
/*public Symbol ButtonSymbol
|
|
{
|
|
get { return (Symbol)GetValue(ButtonSymbolProperty); }
|
|
set { SetValue(ButtonSymbolProperty, value); }
|
|
}
|
|
public static readonly DependencyProperty ButtonSymbolProperty =
|
|
DependencyProperty.Register(
|
|
"ButtonSymbol",
|
|
typeof(Symbol),
|
|
typeof(TextBoxWithButton),
|
|
new PropertyMetadata(Symbol.Delete, (o, args) => { }));*/
|
|
|
|
public string ButtonSymbol
|
|
{
|
|
get { return (string)GetValue(ButtonSymbolProperty); }
|
|
set { SetValue(ButtonSymbolProperty, value); }
|
|
}
|
|
public static readonly DependencyProperty ButtonSymbolProperty =
|
|
DependencyProperty.Register(
|
|
"ButtonSymbol",
|
|
typeof(string),
|
|
typeof(TextBoxWithButton),
|
|
new PropertyMetadata("", (o, args) => { }));
|
|
public event EventHandler<RoutedEventArgs> ButtonClick;
|
|
|
|
protected override void OnApplyTemplate()
|
|
{
|
|
base.OnApplyTemplate();
|
|
var actionButton = GetTemplateChild("ActionButton") as Button;
|
|
if (actionButton != null)
|
|
{
|
|
actionButton.Click += (sender, e) => ButtonClick?.Invoke(sender, e);
|
|
}
|
|
}
|
|
}
|
|
} |