C# Class Telerik.TestStudio.Jira.BugTracking.PasswordBoxAssistant

Since the .NET PasswordBox does not give you a DependencyProperty for the password (encrypted or not) we'll extend it to add our own.
Show file Open project: TestStudio/JiraPlugin

Public Properties

Property Type Description
BindPassword System.Windows.DependencyProperty
BoundPassword System.Windows.DependencyProperty

Public Methods

Method Description
GetBindPassword ( DependencyObject dp ) : bool
GetBoundPassword ( DependencyObject dp ) : string
SetBindPassword ( DependencyObject dp, bool value ) : void
SetBoundPassword ( DependencyObject dp, Base64String value ) : void

Private Methods

Method Description
GetUpdatingPassword ( DependencyObject dp ) : bool
HandlePasswordChanged ( object sender, RoutedEventArgs e ) : void

Called when the value of the PasswordBox is changed in the UI. We'll update the bound property with the updated password value. This triggers the OnBoundPasswordChanged event handler.

OnBindPasswordChanged ( DependencyObject dp, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Called when what the PasswordBox is bound to is changed, generally during UI initialization. We'll change our event listeners for the new PasswordBox.

OnBoundPasswordChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Called when the value of the property the PasswordBox is bound to changes. We'll update the bound property with the updated password value, unless we're already in the middle of updating it because the user changed it in the UI.

SetUpdatingPassword ( DependencyObject dp, bool value ) : void

Method Details

GetBindPassword() public static method

public static GetBindPassword ( DependencyObject dp ) : bool
dp System.Windows.DependencyObject
return bool

GetBoundPassword() public static method

public static GetBoundPassword ( DependencyObject dp ) : string
dp System.Windows.DependencyObject
return string

SetBindPassword() public static method

public static SetBindPassword ( DependencyObject dp, bool value ) : void
dp System.Windows.DependencyObject
value bool
return void

SetBoundPassword() public static method

public static SetBoundPassword ( DependencyObject dp, Base64String value ) : void
dp System.Windows.DependencyObject
value Base64String
return void

Property Details

BindPassword public static property

public static DependencyProperty,System.Windows BindPassword
return System.Windows.DependencyProperty

BoundPassword public static property

public static DependencyProperty,System.Windows BoundPassword
return System.Windows.DependencyProperty