HeaderPane
Main
Hide
Share Link
Print

UseSystemPasswordChar Property, SftMask Class

Defines whether password positions show the system's password character.

Class: SftMask
Namespace: Softelvdm.SftMaskNET
Assembly: Softelvdm.SftMaskNET

Syntax

public bool UseSystemPasswordChar { get; set; }
Public Property UseSystemPasswordChar As Boolean

Value

True to show the system's password character, which takes precedence over the SftMask.PasswordChar property, False to use the SftMask.PasswordChar property.

The default value is False.

Comments

Defines whether password positions show the system's password character.

Examples

C# View entire sample code

        }
        private void Field_TextChanged(object sender, EventArgs e) {
            if (sender == ActiveControl)
                ShowValues((SftMask)sender);
        }

        // The text of the field with the input focus, in two forms, and its value.
        private void ShowValues(SftMask field) {
            if (field.UseSystemPasswordChar) {
                labelValues.Text = "Text: (not shown)";
                return;
            }
            labelValues.Text = "Text: \"" + field.Text + "\"    TextNoLiterals: \"" + field.TextNoLiterals + "\"    Value: " +
                (field.Value.HasValue ? field.Value.Value.ToString(field.Culture) : "(none)");
        }

VB.NET View entire sample code

    Private Sub Field_TextChanged(ByVal sender As Object, ByVal e As EventArgs)
        If sender Is ActiveControl Then
            ShowValues(CType(sender, SftMask))
        End If
    End Sub

    ' The text of the field with the input focus, in two forms, and its value.
    Private Sub ShowValues(ByVal field As SftMask)
        If field.UseSystemPasswordChar Then
            LabelValues.Text = "Text: (not shown)"
            Return
        End If
        Dim value As String = "(none)"
        If field.Value.HasValue Then
            value = field.Value.Value.ToString(field.Culture)
        End If

See Also SftMask Class | Classes | SftMask/NET 3.0