Add passwordBox

This commit is contained in:
Kevin Zhang 2021-11-13 23:59:14 -06:00
parent ddc6af52ed
commit 36bb439647
2 changed files with 12 additions and 0 deletions

View file

@ -29,6 +29,7 @@ namespace Flow.Launcher.Core.Plugin
public bool Validation { get; set; }
public List<string> Options { get; set; }
public string DefaultValue { get; set; }
public char passwordChar { get; set; }
public void Deconstruct(out string Name, out string Label, out string Description, out bool Validation, out List<string> Options, out string DefaultValue)
{
Name = this.Name;

View file

@ -416,6 +416,17 @@ namespace Flow.Launcher.Core.Plugin
contentControl = textBox;
break;
}
case "passwordBox":
{
var passwordBox = new PasswordBox()
{
Width = 300,
Margin = settingControlMargin,
Password = Settings[attribute.Name] as string ?? string.Empty,
PasswordChar = attribute.passwordChar == default ? '*' : attribute.passwordChar
};
break;
}
case "dropdown":
{
var comboBox = new ComboBox()