Class PasswordBox
Represents a control for entering passwords.
Inheritance
System.Object
PasswordBox
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: OpenSilver.dll
Syntax
[TemplatePart(Name = "ContentElement", Type = typeof(FrameworkElement))]
public class PasswordBox : Control, IControl, IFrameworkElement, IUIElement, IDependencyObject
Constructors
|
Improve this Doc
View Source
PasswordBox()
Declaration
Fields
|
Improve this Doc
View Source
CaretBrushProperty
Declaration
public static readonly DependencyProperty CaretBrushProperty
Field Value
|
Improve this Doc
View Source
MaxLengthProperty
Identifies the MaxLength dependency property.
Declaration
public static readonly DependencyProperty MaxLengthProperty
Field Value
|
Improve this Doc
View Source
PasswordCharProperty
Declaration
public static readonly DependencyProperty PasswordCharProperty
Field Value
|
Improve this Doc
View Source
PasswordProperty
Identifies the Password dependency property.
Declaration
public static readonly DependencyProperty PasswordProperty
Field Value
|
Improve this Doc
View Source
SelectionBackgroundProperty
Declaration
[NotImplemented]
public static readonly DependencyProperty SelectionBackgroundProperty
Field Value
|
Improve this Doc
View Source
SelectionForegroundProperty
Declaration
[NotImplemented]
public static readonly DependencyProperty SelectionForegroundProperty
Field Value
Properties
|
Improve this Doc
View Source
CaretBrush
Gets or sets the brush that is used to render the vertical bar that indicates the
insertion point.
Declaration
public Brush CaretBrush { get; set; }
Property Value
Type |
Description |
Brush |
The brush that is used to render the vertical bar that indicates the insertion point.
|
|
Improve this Doc
View Source
MaxLength
Gets or sets the maximum length for passwords to be handled by this PasswordBox.
Declaration
public int MaxLength { get; set; }
Property Value
Type |
Description |
System.Int32 |
An integer that specifies the maximum number of characters for passwords
to be handled by this PasswordBox. A value of zero (0) means no limit. The
default is 0 (no length limit).
|
|
Improve this Doc
View Source
Password
Gets or sets the password currently held by the PasswordBox.
Declaration
public string Password { get; set; }
Property Value
Type |
Description |
System.String |
A string representing the password currently held by the PasswordBox.The
default value is System.String.Empty.
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
The property is set to a null value.
|
|
Improve this Doc
View Source
PasswordChar
Character to display instead of the actual password. The default value is '•'.
Declaration
public char PasswordChar { get; set; }
Property Value
Type |
Description |
System.Char |
|
|
Improve this Doc
View Source
SelectionBackground
Gets or sets the brush used to render the background for the selected text.
Declaration
[NotImplemented]
public Brush SelectionBackground { get; set; }
Property Value
|
Improve this Doc
View Source
SelectionForeground
Gets or sets the brush used for the selected text in the PasswordBox.
Declaration
[NotImplemented]
public Brush SelectionForeground { get; set; }
Property Value
Methods
|
Improve this Doc
View Source
OnApplyTemplate()
Builds the visual tree for the PasswordBox control when
a new template is applied.
Declaration
public override void OnApplyTemplate()
Overrides
|
Improve this Doc
View Source
OnCreateAutomationPeer()
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
Overrides
|
Improve this Doc
View Source
OnGotFocus(RoutedEventArgs)
Declaration
protected override void OnGotFocus(RoutedEventArgs e)
Parameters
Overrides
|
Improve this Doc
View Source
OnLostFocus(RoutedEventArgs)
Declaration
protected override void OnLostFocus(RoutedEventArgs e)
Parameters
Overrides
|
Improve this Doc
View Source
Declaration
protected override void OnMouseEnter(MouseEventArgs e)
Parameters
Overrides
|
Improve this Doc
View Source
Declaration
protected override void OnMouseLeave(MouseEventArgs e)
Parameters
Overrides
|
Improve this Doc
View Source
Declaration
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
Parameters
Overrides
|
Improve this Doc
View Source
Declaration
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
Parameters
Overrides
|
Improve this Doc
View Source
OnPasswordChanged(RoutedEventArgs)
Raises the PasswordChanged event
Declaration
protected void OnPasswordChanged(RoutedEventArgs eventArgs)
Parameters
|
Improve this Doc
View Source
SelectAll()
Selects all the character in the PasswordBox.
Declaration
Events
|
Improve this Doc
View Source
PasswordChanged
Occurs when the value of the Password property changes.
Declaration
public event RoutedEventHandler PasswordChanged
Event Type
Extension Methods