Mask password field in feed credentials

This commit is contained in:
2017-08-09 20:33:40 -04:00
parent f58e4737c0
commit 80cd26b8c3
2 changed files with 11 additions and 7 deletions

View File

@@ -145,7 +145,7 @@
Margin="6"
Padding="20,0,0,0" />
<TextBox Name="AuthenticationUserNameTextBox"
Text="{Binding Path=UserName, UpdateSourceTrigger=Explicit, ValidatesOnExceptions=True}"
Text="{Binding Path=Username, UpdateSourceTrigger=Explicit, ValidatesOnExceptions=True}"
Grid.Column="1"
IsEnabled="{Binding ElementName=RequiresAuthenticationCheckBox, Path=IsChecked}"
Grid.Row="1"
@@ -158,8 +158,7 @@
Grid.Column="0"
Margin="6"
Padding="20,0,0,0" />
<TextBox Name="AuthenticationPasswordTextBox"
Text="{Binding Path=Password, UpdateSourceTrigger=Explicit, ValidatesOnExceptions=True}"
<PasswordBox Name="AuthenticationPasswordTextBox"
Grid.Column="1"
IsEnabled="{Binding ElementName=RequiresAuthenticationCheckBox, Path=IsChecked}"
Grid.Row="2"

View File

@@ -37,6 +37,8 @@ namespace FeedCenter.Options
private void HandleOkayButtonClick(object sender, RoutedEventArgs e)
{
var feed = (Feed) DataContext;
// Get a list of all framework elements and explicit binding expressions
var bindingExpressions = this.GetBindingExpressions(new[] { UpdateSourceTrigger.Explicit });
@@ -76,6 +78,9 @@ namespace FeedCenter.Options
return;
}
if (RequiresAuthenticationCheckBox.IsChecked.GetValueOrDefault(false))
feed.Password = AuthenticationPasswordTextBox.Password;
// Dialog is good
DialogResult = true;