Class PasswordBoxMonitor
Contains a set of attached dependency properties used to monitor and control a PasswordBox.
Inherited Members
Namespace: TheXDS.MCART.Component
Assembly: MCART.Wpf.Common.dll
Syntax
public class PasswordBoxMonitor : DependencyObject
Fields
| Edit this page View SourceIsMonitoringDependencyProperty
Identifies a property that indicates whether the PasswordBox is being monitored.
Declaration
public static readonly DependencyProperty IsMonitoringDependencyProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
MonitoringProperty
Enables monitoring of a PasswordBox.
Declaration
public static readonly DependencyProperty MonitoringProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
PasswordLengthProperty
Gets the length of the password currently shown in the PasswordBox.
Declaration
public static readonly DependencyProperty PasswordLengthProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
PasswordProperty
Emulates a bindable version of Password.
Declaration
public static readonly DependencyProperty PasswordProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
SecurePasswordProperty
Emulates a bindable version of SecurePassword.
Declaration
public static readonly DependencyProperty SecurePasswordProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
Methods
| Edit this page View SourceGetIsMonitoring(DependencyObject)
Gets whether the specified PasswordBox is being monitored.
Declaration
public static bool GetIsMonitoring(DependencyObject obj)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | obj | The instance to read the attached dependency property's value from. |
Returns
| Type | Description |
|---|---|
| bool | true if the instance monitors the specified PasswordBox, otherwise false. |
GetMonitoring(DependencyObject)
Gets the value of the attached dependency property MonitoringProperty.
Declaration
public static PasswordBoxMonitor.MonitorLevel GetMonitoring(DependencyObject obj)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | obj | The instance to read the attached dependency property's value from. |
Returns
| Type | Description |
|---|---|
| PasswordBoxMonitor.MonitorLevel | The active monitoring level for the PasswordBox. |
GetPassword(DependencyObject)
Gets the value of the attached dependency property PasswordProperty.
Declaration
public static string GetPassword(DependencyObject obj)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | obj | The instance to read the attached dependency property's value from. |
Returns
| Type | Description |
|---|---|
| string | The password set on the monitored PasswordBox. |
GetPasswordLength(DependencyObject)
Gets the value of the attached dependency property PasswordLengthProperty.
Declaration
public static int GetPasswordLength(DependencyObject obj)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | obj | The instance to read the attached dependency property's value from. |
Returns
| Type | Description |
|---|---|
| int | The password length for the monitored PasswordBox. |
GetSecurePassword(DependencyObject)
Gets the value of the attached dependency property SecurePasswordProperty.
Declaration
public static SecureString GetSecurePassword(DependencyObject obj)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | obj | The instance to read the attached dependency property's value from. |
Returns
| Type | Description |
|---|---|
| SecureString | The secure password set on the monitored PasswordBox. |
SetMonitoring(DependencyObject, MonitorLevel)
Sets the value of the attached dependency property MonitoringProperty on the specified object.
Declaration
public static void SetMonitoring(DependencyObject obj, PasswordBoxMonitor.MonitorLevel value)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | obj | The object on which to set the attached dependency property value. |
| PasswordBoxMonitor.MonitorLevel | value | The value to set for the attached property. |
SetPassword(DependencyObject, string)
Sets the value of the attached dependency property PasswordProperty on the specified object.
Declaration
public static void SetPassword(DependencyObject obj, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | obj | The object on which to set the attached dependency property value. |
| string | value | The value to set for the attached property. |
SetPasswordLength(DependencyObject, int)
Sets the value of the attached dependency property PasswordLengthProperty on the specified object.
Declaration
public static void SetPasswordLength(DependencyObject obj, int value)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | obj | The object on which to set the attached dependency property value. |
| int | value | The value to set for the attached property. |
SetSecurePassword(DependencyObject, SecureString)
Sets the value of the attached dependency property SecurePasswordProperty on the specified object.
Declaration
public static void SetSecurePassword(DependencyObject obj, SecureString value)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | obj | The object on which to set the attached dependency property value. |
| SecureString | value | The value to set for the attached property. |